2019-09-26 13:16:36 +00:00
|
|
|
import { ShopInfo_shop_permissions } from "./components/Shop/types/ShopInfo";
|
2020-07-07 10:14:12 +00:00
|
|
|
import { User_userPermissions } from "./fragments/types/User";
|
2019-08-09 11:14:35 +00:00
|
|
|
import {
|
|
|
|
FetchMoreProps,
|
|
|
|
FilterPageProps,
|
|
|
|
ListActions,
|
2019-09-10 15:14:11 +00:00
|
|
|
PageListProps,
|
|
|
|
SearchPageProps,
|
2019-09-16 10:19:06 +00:00
|
|
|
SortPage,
|
2019-09-10 15:14:11 +00:00
|
|
|
TabPageProps
|
2019-08-09 11:14:35 +00:00
|
|
|
} from "./types";
|
2019-09-26 13:16:36 +00:00
|
|
|
import { PermissionEnum } from "./types/globalTypes";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
|
|
|
const pageInfo = {
|
|
|
|
hasNextPage: true,
|
|
|
|
hasPreviousPage: false
|
|
|
|
};
|
|
|
|
export const pageListProps: { [key: string]: PageListProps } = {
|
|
|
|
default: {
|
|
|
|
disabled: false,
|
|
|
|
onAdd: undefined,
|
|
|
|
onNextPage: undefined,
|
|
|
|
onPreviousPage: undefined,
|
|
|
|
onRowClick: () => undefined,
|
2019-08-09 11:14:35 +00:00
|
|
|
pageInfo,
|
|
|
|
settings: { rowNumber: 20 }
|
2019-06-19 14:40:52 +00:00
|
|
|
},
|
|
|
|
loading: {
|
|
|
|
disabled: true,
|
|
|
|
onAdd: undefined,
|
|
|
|
onNextPage: undefined,
|
|
|
|
onPreviousPage: undefined,
|
|
|
|
onRowClick: () => undefined,
|
2019-08-09 11:14:35 +00:00
|
|
|
pageInfo,
|
|
|
|
settings: undefined
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
export const listActionsProps: ListActions = {
|
|
|
|
isChecked: () => undefined,
|
|
|
|
selected: 0,
|
|
|
|
toggle: () => undefined,
|
|
|
|
toggleAll: () => undefined,
|
|
|
|
toolbar: null
|
|
|
|
};
|
|
|
|
|
|
|
|
export const countries = [
|
2019-12-02 10:49:14 +00:00
|
|
|
{ code: "AF", name: "Afghanistan" },
|
|
|
|
{ code: "AX", name: "Åland Islands" },
|
|
|
|
{ code: "AL", name: "Albania" },
|
|
|
|
{ code: "DZ", name: "Algeria" },
|
|
|
|
{ code: "AS", name: "American Samoa" },
|
|
|
|
{ code: "AD", name: "AndorrA" },
|
|
|
|
{ code: "AO", name: "Angola" },
|
|
|
|
{ code: "AI", name: "Anguilla" },
|
|
|
|
{ code: "AQ", name: "Antarctica" },
|
|
|
|
{ code: "AG", name: "Antigua and Barbuda" },
|
|
|
|
{ code: "AR", name: "Argentina" },
|
|
|
|
{ code: "AM", name: "Armenia" },
|
|
|
|
{ code: "AW", name: "Aruba" },
|
|
|
|
{ code: "AU", name: "Australia" },
|
|
|
|
{ code: "AT", name: "Austria" },
|
|
|
|
{ code: "AZ", name: "Azerbaijan" },
|
|
|
|
{ code: "BS", name: "Bahamas" },
|
|
|
|
{ code: "BH", name: "Bahrain" },
|
|
|
|
{ code: "BD", name: "Bangladesh" },
|
|
|
|
{ code: "BB", name: "Barbados" },
|
|
|
|
{ code: "BY", name: "Belarus" },
|
|
|
|
{ code: "BE", name: "Belgium" },
|
|
|
|
{ code: "BZ", name: "Belize" },
|
|
|
|
{ code: "BJ", name: "Benin" },
|
|
|
|
{ code: "BM", name: "Bermuda" },
|
|
|
|
{ code: "BT", name: "Bhutan" },
|
|
|
|
{ code: "BO", name: "Bolivia" },
|
|
|
|
{ code: "BA", name: "Bosnia and Herzegovina" },
|
|
|
|
{ code: "BW", name: "Botswana" },
|
|
|
|
{ code: "BV", name: "Bouvet Island" },
|
|
|
|
{ code: "BR", name: "Brazil" },
|
|
|
|
{ code: "IO", name: "British Indian Ocean Territory" },
|
|
|
|
{ code: "BN", name: "Brunei Darussalam" },
|
|
|
|
{ code: "BG", name: "Bulgaria" },
|
|
|
|
{ code: "BF", name: "Burkina Faso" },
|
|
|
|
{ code: "BI", name: "Burundi" },
|
|
|
|
{ code: "KH", name: "Cambodia" },
|
|
|
|
{ code: "CM", name: "Cameroon" },
|
|
|
|
{ code: "CA", name: "Canada" },
|
|
|
|
{ code: "CV", name: "Cape Verde" },
|
|
|
|
{ code: "KY", name: "Cayman Islands" },
|
|
|
|
{ code: "CF", name: "Central African Republic" },
|
|
|
|
{ code: "TD", name: "Chad" },
|
|
|
|
{ code: "CL", name: "Chile" },
|
|
|
|
{ code: "CN", name: "China" },
|
|
|
|
{ code: "CX", name: "Christmas Island" },
|
|
|
|
{ code: "CC", name: "Cocos (Keeling) Islands" },
|
|
|
|
{ code: "CO", name: "Colombia" },
|
|
|
|
{ code: "KM", name: "Comoros" },
|
|
|
|
{ code: "CG", name: "Congo" },
|
|
|
|
{ code: "CD", name: "Congo, The Democratic Republic of the" },
|
|
|
|
{ code: "CK", name: "Cook Islands" },
|
|
|
|
{ code: "CR", name: "Costa Rica" },
|
|
|
|
{ code: "CI", name: "Cote D'Ivoire" },
|
|
|
|
{ code: "HR", name: "Croatia" },
|
|
|
|
{ code: "CU", name: "Cuba" },
|
|
|
|
{ code: "CY", name: "Cyprus" },
|
|
|
|
{ code: "CZ", name: "Czech Republic" },
|
|
|
|
{ code: "DK", name: "Denmark" },
|
|
|
|
{ code: "DJ", name: "Djibouti" },
|
|
|
|
{ code: "DM", name: "Dominica" },
|
|
|
|
{ code: "DO", name: "Dominican Republic" },
|
|
|
|
{ code: "EC", name: "Ecuador" },
|
|
|
|
{ code: "EG", name: "Egypt" },
|
|
|
|
{ code: "SV", name: "El Salvador" },
|
|
|
|
{ code: "GQ", name: "Equatorial Guinea" },
|
|
|
|
{ code: "ER", name: "Eritrea" },
|
|
|
|
{ code: "EE", name: "Estonia" },
|
|
|
|
{ code: "ET", name: "Ethiopia" },
|
|
|
|
{ code: "FK", name: "Falkland Islands (Malvinas)" },
|
|
|
|
{ code: "FO", name: "Faroe Islands" },
|
|
|
|
{ code: "FJ", name: "Fiji" },
|
|
|
|
{ code: "FI", name: "Finland" },
|
|
|
|
{ code: "FR", name: "France" },
|
|
|
|
{ code: "GF", name: "French Guiana" },
|
|
|
|
{ code: "PF", name: "French Polynesia" },
|
|
|
|
{ code: "TF", name: "French Southern Territories" },
|
|
|
|
{ code: "GA", name: "Gabon" },
|
|
|
|
{ code: "GM", name: "Gambia" },
|
|
|
|
{ code: "GE", name: "Georgia" },
|
|
|
|
{ code: "DE", name: "Germany" },
|
|
|
|
{ code: "GH", name: "Ghana" },
|
|
|
|
{ code: "GI", name: "Gibraltar" },
|
|
|
|
{ code: "GR", name: "Greece" },
|
|
|
|
{ code: "GL", name: "Greenland" },
|
|
|
|
{ code: "GD", name: "Grenada" },
|
|
|
|
{ code: "GP", name: "Guadeloupe" },
|
|
|
|
{ code: "GU", name: "Guam" },
|
|
|
|
{ code: "GT", name: "Guatemala" },
|
|
|
|
{ code: "GG", name: "Guernsey" },
|
|
|
|
{ code: "GN", name: "Guinea" },
|
|
|
|
{ code: "GW", name: "Guinea-Bissau" },
|
|
|
|
{ code: "GY", name: "Guyana" },
|
|
|
|
{ code: "HT", name: "Haiti" },
|
|
|
|
{ code: "HM", name: "Heard Island and Mcdonald Islands" },
|
|
|
|
{ code: "VA", name: "Holy See (Vatican City State)" },
|
|
|
|
{ code: "HN", name: "Honduras" },
|
|
|
|
{ code: "HK", name: "Hong Kong" },
|
|
|
|
{ code: "HU", name: "Hungary" },
|
|
|
|
{ code: "IS", name: "Iceland" },
|
|
|
|
{ code: "IN", name: "India" },
|
|
|
|
{ code: "ID", name: "Indonesia" },
|
|
|
|
{ code: "IR", name: "Iran, Islamic Republic Of" },
|
|
|
|
{ code: "IQ", name: "Iraq" },
|
|
|
|
{ code: "IE", name: "Ireland" },
|
|
|
|
{ code: "IM", name: "Isle of Man" },
|
|
|
|
{ code: "IL", name: "Israel" },
|
|
|
|
{ code: "IT", name: "Italy" },
|
|
|
|
{ code: "JM", name: "Jamaica" },
|
|
|
|
{ code: "JP", name: "Japan" },
|
|
|
|
{ code: "JE", name: "Jersey" },
|
|
|
|
{ code: "JO", name: "Jordan" },
|
|
|
|
{ code: "KZ", name: "Kazakhstan" },
|
|
|
|
{ code: "KE", name: "Kenya" },
|
|
|
|
{ code: "KI", name: "Kiribati" },
|
|
|
|
{ code: "KP", name: "Korea, Democratic People'S Republic of" },
|
|
|
|
{ code: "KR", name: "Korea, Republic of" },
|
|
|
|
{ code: "KW", name: "Kuwait" },
|
|
|
|
{ code: "KG", name: "Kyrgyzstan" },
|
|
|
|
{ code: "LA", name: "Lao People'S Democratic Republic" },
|
|
|
|
{ code: "LV", name: "Latvia" },
|
|
|
|
{ code: "LB", name: "Lebanon" },
|
|
|
|
{ code: "LS", name: "Lesotho" },
|
|
|
|
{ code: "LR", name: "Liberia" },
|
|
|
|
{ code: "LY", name: "Libyan Arab Jamahiriya" },
|
|
|
|
{ code: "LI", name: "Liechtenstein" },
|
|
|
|
{ code: "LT", name: "Lithuania" },
|
|
|
|
{ code: "LU", name: "Luxembourg" },
|
|
|
|
{ code: "MO", name: "Macao" },
|
|
|
|
{ code: "MK", name: "Macedonia, The Former Yugoslav Republic of" },
|
|
|
|
{ code: "MG", name: "Madagascar" },
|
|
|
|
{ code: "MW", name: "Malawi" },
|
|
|
|
{ code: "MY", name: "Malaysia" },
|
|
|
|
{ code: "MV", name: "Maldives" },
|
|
|
|
{ code: "ML", name: "Mali" },
|
|
|
|
{ code: "MT", name: "Malta" },
|
|
|
|
{ code: "MH", name: "Marshall Islands" },
|
|
|
|
{ code: "MQ", name: "Martinique" },
|
|
|
|
{ code: "MR", name: "Mauritania" },
|
|
|
|
{ code: "MU", name: "Mauritius" },
|
|
|
|
{ code: "YT", name: "Mayotte" },
|
|
|
|
{ code: "MX", name: "Mexico" },
|
|
|
|
{ code: "FM", name: "Micronesia, Federated States of" },
|
|
|
|
{ code: "MD", name: "Moldova, Republic of" },
|
|
|
|
{ code: "MC", name: "Monaco" },
|
|
|
|
{ code: "MN", name: "Mongolia" },
|
|
|
|
{ code: "MS", name: "Montserrat" },
|
|
|
|
{ code: "MA", name: "Morocco" },
|
|
|
|
{ code: "MZ", name: "Mozambique" },
|
|
|
|
{ code: "MM", name: "Myanmar" },
|
|
|
|
{ code: "NA", name: "Namibia" },
|
|
|
|
{ code: "NR", name: "Nauru" },
|
|
|
|
{ code: "NP", name: "Nepal" },
|
|
|
|
{ code: "NL", name: "Netherlands" },
|
|
|
|
{ code: "AN", name: "Netherlands Antilles" },
|
|
|
|
{ code: "NC", name: "New Caledonia" },
|
|
|
|
{ code: "NZ", name: "New Zealand" },
|
|
|
|
{ code: "NI", name: "Nicaragua" },
|
|
|
|
{ code: "NE", name: "Niger" },
|
|
|
|
{ code: "NG", name: "Nigeria" },
|
|
|
|
{ code: "NU", name: "Niue" },
|
|
|
|
{ code: "NF", name: "Norfolk Island" },
|
|
|
|
{ code: "MP", name: "Northern Mariana Islands" },
|
|
|
|
{ code: "NO", name: "Norway" },
|
|
|
|
{ code: "OM", name: "Oman" },
|
|
|
|
{ code: "PK", name: "Pakistan" },
|
|
|
|
{ code: "PW", name: "Palau" },
|
|
|
|
{ code: "PS", name: "Palestinian Territory, Occupied" },
|
|
|
|
{ code: "PA", name: "Panama" },
|
|
|
|
{ code: "PG", name: "Papua New Guinea" },
|
|
|
|
{ code: "PY", name: "Paraguay" },
|
|
|
|
{ code: "PE", name: "Peru" },
|
|
|
|
{ code: "PH", name: "Philippines" },
|
|
|
|
{ code: "PN", name: "Pitcairn" },
|
|
|
|
{ code: "PL", name: "Poland" },
|
|
|
|
{ code: "PT", name: "Portugal" },
|
|
|
|
{ code: "PR", name: "Puerto Rico" },
|
|
|
|
{ code: "QA", name: "Qatar" },
|
|
|
|
{ code: "RE", name: "Reunion" },
|
|
|
|
{ code: "RO", name: "Romania" },
|
|
|
|
{ code: "RU", name: "Russian Federation" },
|
|
|
|
{ code: "RW", name: "RWANDA" },
|
|
|
|
{ code: "SH", name: "Saint Helena" },
|
|
|
|
{ code: "KN", name: "Saint Kitts and Nevis" },
|
|
|
|
{ code: "LC", name: "Saint Lucia" },
|
|
|
|
{ code: "PM", name: "Saint Pierre and Miquelon" },
|
|
|
|
{ code: "VC", name: "Saint Vincent and the Grenadines" },
|
|
|
|
{ code: "WS", name: "Samoa" },
|
|
|
|
{ code: "SM", name: "San Marino" },
|
|
|
|
{ code: "ST", name: "Sao Tome and Principe" },
|
|
|
|
{ code: "SA", name: "Saudi Arabia" },
|
|
|
|
{ code: "SN", name: "Senegal" },
|
|
|
|
{ code: "CS", name: "Serbia and Montenegro" },
|
|
|
|
{ code: "SC", name: "Seychelles" },
|
|
|
|
{ code: "SL", name: "Sierra Leone" },
|
|
|
|
{ code: "SG", name: "Singapore" },
|
|
|
|
{ code: "SK", name: "Slovakia" },
|
|
|
|
{ code: "SI", name: "Slovenia" },
|
|
|
|
{ code: "SB", name: "Solomon Islands" },
|
|
|
|
{ code: "SO", name: "Somalia" },
|
|
|
|
{ code: "ZA", name: "South Africa" },
|
|
|
|
{ code: "GS", name: "South Georgia and the South Sandwich Islands" },
|
|
|
|
{ code: "ES", name: "Spain" },
|
|
|
|
{ code: "LK", name: "Sri Lanka" },
|
|
|
|
{ code: "SD", name: "Sudan" },
|
|
|
|
{ code: "SR", name: "Suriname" },
|
|
|
|
{ code: "SJ", name: "Svalbard and Jan Mayen" },
|
|
|
|
{ code: "SZ", name: "Swaziland" },
|
|
|
|
{ code: "SE", name: "Sweden" },
|
|
|
|
{ code: "CH", name: "Switzerland" },
|
|
|
|
{ code: "SY", name: "Syrian Arab Republic" },
|
|
|
|
{ code: "TW", name: "Taiwan, Province of China" },
|
|
|
|
{ code: "TJ", name: "Tajikistan" },
|
|
|
|
{ code: "TZ", name: "Tanzania, United Republic of" },
|
|
|
|
{ code: "TH", name: "Thailand" },
|
|
|
|
{ code: "TL", name: "Timor-Leste" },
|
|
|
|
{ code: "TG", name: "Togo" },
|
|
|
|
{ code: "TK", name: "Tokelau" },
|
|
|
|
{ code: "TO", name: "Tonga" },
|
|
|
|
{ code: "TT", name: "Trinidad and Tobago" },
|
|
|
|
{ code: "TN", name: "Tunisia" },
|
|
|
|
{ code: "TR", name: "Turkey" },
|
|
|
|
{ code: "TM", name: "Turkmenistan" },
|
|
|
|
{ code: "TC", name: "Turks and Caicos Islands" },
|
|
|
|
{ code: "TV", name: "Tuvalu" },
|
|
|
|
{ code: "UG", name: "Uganda" },
|
|
|
|
{ code: "UA", name: "Ukraine" },
|
|
|
|
{ code: "AE", name: "United Arab Emirates" },
|
|
|
|
{ code: "GB", name: "United Kingdom" },
|
|
|
|
{ code: "US", name: "United States" },
|
|
|
|
{ code: "UM", name: "United States Minor Outlying Islands" },
|
|
|
|
{ code: "UY", name: "Uruguay" },
|
|
|
|
{ code: "UZ", name: "Uzbekistan" },
|
|
|
|
{ code: "VU", name: "Vanuatu" },
|
|
|
|
{ code: "VE", name: "Venezuela" },
|
|
|
|
{ code: "VN", name: "Viet Nam" },
|
|
|
|
{ code: "VG", name: "Virgin Islands, British" },
|
|
|
|
{ code: "VI", name: "Virgin Islands, U.S." },
|
|
|
|
{ code: "WF", name: "Wallis and Futuna" },
|
|
|
|
{ code: "EH", name: "Western Sahara" },
|
|
|
|
{ code: "YE", name: "Yemen" },
|
|
|
|
{ code: "ZM", name: "Zambia" },
|
|
|
|
{ code: "ZW", name: "Zimbabwe" }
|
2019-06-19 14:40:52 +00:00
|
|
|
];
|
|
|
|
|
2019-09-10 15:14:11 +00:00
|
|
|
export const tabPageProps: TabPageProps = {
|
2019-06-19 14:40:52 +00:00
|
|
|
currentTab: 0,
|
|
|
|
onAll: () => undefined,
|
2019-09-10 15:14:11 +00:00
|
|
|
onTabChange: () => undefined,
|
|
|
|
onTabDelete: () => undefined,
|
|
|
|
onTabSave: () => undefined,
|
|
|
|
tabs: ["Tab X"]
|
|
|
|
};
|
|
|
|
|
|
|
|
export const searchPageProps: SearchPageProps = {
|
|
|
|
initialSearch: "",
|
|
|
|
onSearchChange: () => undefined
|
|
|
|
};
|
|
|
|
|
2019-12-20 16:52:29 +00:00
|
|
|
export const filterPageProps: FilterPageProps<string, object> = {
|
2019-09-10 15:14:11 +00:00
|
|
|
...searchPageProps,
|
|
|
|
...tabPageProps,
|
2019-12-20 16:52:29 +00:00
|
|
|
filterOpts: {},
|
|
|
|
onFilterChange: () => undefined
|
2019-06-19 14:40:52 +00:00
|
|
|
};
|
|
|
|
|
2019-08-09 11:14:35 +00:00
|
|
|
export const fetchMoreProps: FetchMoreProps = {
|
|
|
|
hasMore: true,
|
|
|
|
loading: false,
|
|
|
|
onFetchMore: () => undefined
|
|
|
|
};
|
2019-09-16 10:19:06 +00:00
|
|
|
|
|
|
|
export const sortPageProps: SortPage<string> = {
|
|
|
|
onSort: () => undefined,
|
|
|
|
sort: {
|
|
|
|
asc: true
|
|
|
|
}
|
|
|
|
};
|
2019-09-26 13:16:36 +00:00
|
|
|
|
|
|
|
export const permissions: ShopInfo_shop_permissions[] = [
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_DISCOUNTS,
|
|
|
|
name: "Manage sales and vouchers."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_MENUS,
|
|
|
|
name: "Manage navigation."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_ORDERS,
|
|
|
|
name: "Manage orders."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_PAGES,
|
|
|
|
name: "Manage pages."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_PRODUCTS,
|
|
|
|
name: "Manage products."
|
|
|
|
},
|
2020-10-15 11:53:25 +00:00
|
|
|
{
|
Multichannel (#833)
* add multichannel to configuration view
* create multichannels list view
* create multichannels list view
* add ChannelsCreate view
* update channels in configuration
* add stories
* update default messages
* fix ChannelForm props
* update channels list styles
* update snapshots
* update channel form currency input
* update Channels fragments
* extract messages
* remove tabs from channelsList
* channel details, channel delete modal (#598)
* create Channel details view
* create ChannelDeleteDialog
* add channels delete dialog to channels list
* update messages and types
* fixes after review
* channels availability (#609)
* create Channel details view
* update messages and types
* create ChannelsAvailability component
* create more product channels components
* create channels stories, update fixtures, types
* update product views with channels data
* update schema and snapshots
* update defaultMessages
* update ProductUpdate view
* create ChannelsAvailabilityDropdown component
* add product channels to local storage
* update globalTypes
* Update to new schema and resolve issues
* Update messages
* create deleteChannel mutation
* add channels availability component to product create view
* refactor ProductCreate and ProductUpdate views
* CollectionProducts view cleanup
* add disabled prop to ActionDialog
* use updateChannels mutation in ProductCreate view
* ProductCreate - update submit function
* fixes after review
* update snapshots and messages
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
* channels shipping components (#655)
* create PricingCard, OrderValue and OrderWeight components
* create ShippingZoneRatesPage and DeleteShippingRateDialog
* update ChannelsAvailability component
* updates after review
* channels shipping views (#662)
* update ChannelsAvailability component
* updates after review
* create PriceRate views, update types
* create weight rates views
* update shipping views, stories, messages
* update snapshots
* update snapshots
* update useChannels hook
* orders channels components (#698)
* create OrderChannelSectionCard component
* update OrderDetailsPage
* update DraftOrderChannelCard
* update snapshots
* update fixtures
* small change after review, update snapshots
* product pricing (#702)
* update product types
* update Pricing in simple product view
* use productVariantCreate mutation in simple product view
* update snapshots and messages
* handle create variant (#715)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update snapshots and messages
* fix update and create product handlers
* update pricing types
* channels modal - new styles, search input (#717)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* fix search input label styles
* update toggleAllChannels function
* update variant creator (#724)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* add channelLisitngs to variant creator
* update variant creator price styles
* update product variant creator reducer tests
* update createVariants tests
* update error handling in product variant creator
* add Skip pricing for now option
* use PriceField instead of TextField in ProductVariantCreatorSummary
* create price validation function
* fix errors handling in ProductVariantPrice component
* fixes after review
* Product List - remove publish/unpublish buttons (#727)
* ProductList - remove publish and unpublish buttons
* update messages
* update snapshots, messages
* revert changes in ChannelsAvailabilityDropdown
* products/shipping/discount list settings (#739)
* create ChannelSettingsDialog component
* update snapshots
* ProductList - open settings modal when there is no selected channel
* add settings modal to vouchers list
* add settings dialog to sales list
* add setting modal to shipping list
* update shipping
* update snapshots, messages
* useChannelsSettings - remove selectedChannelSlug
* fix channels update handler in product and shipping view
* messages update in ChannelSettingsDialog
* handle product/discount list when there is no channels
* update onSettingsOpen prop
* collection availability dropdown (#743)
* add availability dropdown to collection products list
* update channelListingProduct fragment name
* update voucher view/components with channels (#746)
* update voucher view/components with channels
* update VoucherSummary, remove defaultCurrency from voucher components
* update snapshots
* move getChannelsVariables func to discounts handlers
* update voucher messages
* sale view/components with channels (#750)
* update sale views with channels
* small fixes in discounts
* order views with channels (#752)
* update draft orders with channels
* add channel activate/deactivate mutations
* remove sort by total in orders list
* add error notification on channel activate/deactivate
* product variants channel select (#755)
* add channels selector to ProductVariants component
* remove selectedChannel from ProductUpdate, update messages and snapshots
* update product fragments
* update translations (#762)
* update translations
* fix translation types
* update messages
* update Availability component (#766)
* update ChannelsAvailability component
* update product fixtures
* update collection and channel fixtures
* ChannelsAvailability - handle errors
* update product handlers
* update ChannelsAvailability styles
* update ProductVariant
* update snapshots
* fix missing things in multichannel (#785)
* add availability dropdown to discount products list
* fix error handling in shipping components
* update product views and components
* update messages
* update category view/components
* update CategoryProducts styles
* remove defaultCurrency from shipping components
* create ChannelsSelect component
* update channels error handling after review
* another fixes after review
* Add channels to collection views/components (#791)
** update collection components and views
* update create collection view
* update error handling in collection
* remove filter bar from collection list
* update products fragments
* small fix in collection create view
* use collectionFragment in useCatalogSearch
* update defaultMessages and snapshots
* update homepage view/drop defaultCurrency (#801)
* update homepage view
* drop defaultCurrency prop
* fix onChannelChange function in home view
* remove visibility from product list filters
* update export products with channels (#803)
* update ProductExportDialog with channels
* add new channel error code
* remover VISIBLE from product export dialog Financial information
* fix input size in ProductVariantCreatorSummary (#804)
* channels currency code select (#806)
* create select with currency codes
* fix ChannelDeleteDialog
* update defaultMessages, remove unneeded ChannelDetails handlers
* fixes after rebase
* replace channelListing with channelListings
* [multichannel] Update schema]
* Fix product create test
Co-authored-by: AlicjaSzu <alicja.szukuc@gmail.com>
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2020-11-17 16:10:42 +00:00
|
|
|
code: PermissionEnum.MANAGE_PRODUCTS,
|
2020-10-15 11:53:25 +00:00
|
|
|
name: "Manage product types and attributes."
|
|
|
|
},
|
2019-09-26 13:16:36 +00:00
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_SETTINGS,
|
|
|
|
name: "Manage settings."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_SHIPPING,
|
|
|
|
name: "Manage shipping."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_STAFF,
|
|
|
|
name: "Manage staff."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_USERS,
|
|
|
|
name: "Manage customers."
|
2019-10-25 13:31:27 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
code: PermissionEnum.MANAGE_PLUGINS,
|
|
|
|
name: "Manage plugins."
|
|
|
|
},
|
|
|
|
{
|
2020-04-22 10:17:19 +00:00
|
|
|
code: PermissionEnum.MANAGE_APPS,
|
|
|
|
name: "Manage apps."
|
2019-10-25 13:31:27 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-22 10:54:15 +00:00
|
|
|
code: PermissionEnum.MANAGE_APPS,
|
2019-10-25 13:31:27 +00:00
|
|
|
name: "Manage webhooks."
|
2019-09-26 13:16:36 +00:00
|
|
|
}
|
|
|
|
].map(perm => ({
|
2020-04-20 11:11:07 +00:00
|
|
|
__typename: "Permission" as "Permission",
|
2019-09-26 13:16:36 +00:00
|
|
|
...perm
|
|
|
|
}));
|
2020-01-13 14:26:10 +00:00
|
|
|
|
|
|
|
export const date = {
|
|
|
|
from: "2019-12-09",
|
|
|
|
to: "2019-12-38"
|
|
|
|
};
|
2020-04-23 15:43:08 +00:00
|
|
|
|
|
|
|
export const adminUserPermissions: User_userPermissions[] = [
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_CHECKOUTS,
|
|
|
|
name: "Manage checkouts"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_CHECKOUTS,
|
|
|
|
name: "Manage checkouts"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_DISCOUNTS,
|
|
|
|
name: "Manage sales and vouchers."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_GIFT_CARD,
|
|
|
|
name: "Manage gift cards."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_GIFT_CARD,
|
|
|
|
name: "Manage gift cards."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_MENUS,
|
|
|
|
name: "Manage navigation."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_ORDERS,
|
|
|
|
name: "Manage orders."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_ORDERS,
|
|
|
|
name: "Manage orders."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_PAGES,
|
|
|
|
name: "Manage pages."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_PLUGINS,
|
|
|
|
name: "Manage plugins"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_PRODUCTS,
|
|
|
|
name: "Manage products."
|
|
|
|
},
|
2020-10-15 11:53:25 +00:00
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
Multichannel (#833)
* add multichannel to configuration view
* create multichannels list view
* create multichannels list view
* add ChannelsCreate view
* update channels in configuration
* add stories
* update default messages
* fix ChannelForm props
* update channels list styles
* update snapshots
* update channel form currency input
* update Channels fragments
* extract messages
* remove tabs from channelsList
* channel details, channel delete modal (#598)
* create Channel details view
* create ChannelDeleteDialog
* add channels delete dialog to channels list
* update messages and types
* fixes after review
* channels availability (#609)
* create Channel details view
* update messages and types
* create ChannelsAvailability component
* create more product channels components
* create channels stories, update fixtures, types
* update product views with channels data
* update schema and snapshots
* update defaultMessages
* update ProductUpdate view
* create ChannelsAvailabilityDropdown component
* add product channels to local storage
* update globalTypes
* Update to new schema and resolve issues
* Update messages
* create deleteChannel mutation
* add channels availability component to product create view
* refactor ProductCreate and ProductUpdate views
* CollectionProducts view cleanup
* add disabled prop to ActionDialog
* use updateChannels mutation in ProductCreate view
* ProductCreate - update submit function
* fixes after review
* update snapshots and messages
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
* channels shipping components (#655)
* create PricingCard, OrderValue and OrderWeight components
* create ShippingZoneRatesPage and DeleteShippingRateDialog
* update ChannelsAvailability component
* updates after review
* channels shipping views (#662)
* update ChannelsAvailability component
* updates after review
* create PriceRate views, update types
* create weight rates views
* update shipping views, stories, messages
* update snapshots
* update snapshots
* update useChannels hook
* orders channels components (#698)
* create OrderChannelSectionCard component
* update OrderDetailsPage
* update DraftOrderChannelCard
* update snapshots
* update fixtures
* small change after review, update snapshots
* product pricing (#702)
* update product types
* update Pricing in simple product view
* use productVariantCreate mutation in simple product view
* update snapshots and messages
* handle create variant (#715)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update snapshots and messages
* fix update and create product handlers
* update pricing types
* channels modal - new styles, search input (#717)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* fix search input label styles
* update toggleAllChannels function
* update variant creator (#724)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* add channelLisitngs to variant creator
* update variant creator price styles
* update product variant creator reducer tests
* update createVariants tests
* update error handling in product variant creator
* add Skip pricing for now option
* use PriceField instead of TextField in ProductVariantCreatorSummary
* create price validation function
* fix errors handling in ProductVariantPrice component
* fixes after review
* Product List - remove publish/unpublish buttons (#727)
* ProductList - remove publish and unpublish buttons
* update messages
* update snapshots, messages
* revert changes in ChannelsAvailabilityDropdown
* products/shipping/discount list settings (#739)
* create ChannelSettingsDialog component
* update snapshots
* ProductList - open settings modal when there is no selected channel
* add settings modal to vouchers list
* add settings dialog to sales list
* add setting modal to shipping list
* update shipping
* update snapshots, messages
* useChannelsSettings - remove selectedChannelSlug
* fix channels update handler in product and shipping view
* messages update in ChannelSettingsDialog
* handle product/discount list when there is no channels
* update onSettingsOpen prop
* collection availability dropdown (#743)
* add availability dropdown to collection products list
* update channelListingProduct fragment name
* update voucher view/components with channels (#746)
* update voucher view/components with channels
* update VoucherSummary, remove defaultCurrency from voucher components
* update snapshots
* move getChannelsVariables func to discounts handlers
* update voucher messages
* sale view/components with channels (#750)
* update sale views with channels
* small fixes in discounts
* order views with channels (#752)
* update draft orders with channels
* add channel activate/deactivate mutations
* remove sort by total in orders list
* add error notification on channel activate/deactivate
* product variants channel select (#755)
* add channels selector to ProductVariants component
* remove selectedChannel from ProductUpdate, update messages and snapshots
* update product fragments
* update translations (#762)
* update translations
* fix translation types
* update messages
* update Availability component (#766)
* update ChannelsAvailability component
* update product fixtures
* update collection and channel fixtures
* ChannelsAvailability - handle errors
* update product handlers
* update ChannelsAvailability styles
* update ProductVariant
* update snapshots
* fix missing things in multichannel (#785)
* add availability dropdown to discount products list
* fix error handling in shipping components
* update product views and components
* update messages
* update category view/components
* update CategoryProducts styles
* remove defaultCurrency from shipping components
* create ChannelsSelect component
* update channels error handling after review
* another fixes after review
* Add channels to collection views/components (#791)
** update collection components and views
* update create collection view
* update error handling in collection
* remove filter bar from collection list
* update products fragments
* small fix in collection create view
* use collectionFragment in useCatalogSearch
* update defaultMessages and snapshots
* update homepage view/drop defaultCurrency (#801)
* update homepage view
* drop defaultCurrency prop
* fix onChannelChange function in home view
* remove visibility from product list filters
* update export products with channels (#803)
* update ProductExportDialog with channels
* add new channel error code
* remover VISIBLE from product export dialog Financial information
* fix input size in ProductVariantCreatorSummary (#804)
* channels currency code select (#806)
* create select with currency codes
* fix ChannelDeleteDialog
* update defaultMessages, remove unneeded ChannelDetails handlers
* fixes after rebase
* replace channelListing with channelListings
* [multichannel] Update schema]
* Fix product create test
Co-authored-by: AlicjaSzu <alicja.szukuc@gmail.com>
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2020-11-17 16:10:42 +00:00
|
|
|
code: PermissionEnum.MANAGE_PRODUCTS,
|
2020-10-15 11:53:25 +00:00
|
|
|
name: "Manage product types and attributes."
|
|
|
|
},
|
2020-04-23 15:43:08 +00:00
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_SETTINGS,
|
|
|
|
name: "Manage settings."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_SHIPPING,
|
|
|
|
name: "Manage shipping."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_STAFF,
|
|
|
|
name: "Manage staff."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_STAFF,
|
|
|
|
name: "Manage staff."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_TRANSLATIONS,
|
|
|
|
name: "Manage translations."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_USERS,
|
|
|
|
name: "Manage customers."
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "UserPermission",
|
|
|
|
code: PermissionEnum.MANAGE_USERS,
|
|
|
|
name: "Manage customers."
|
|
|
|
}
|
|
|
|
];
|
2020-01-30 14:34:27 +00:00
|
|
|
|
|
|
|
export const address = {
|
2020-01-30 15:37:22 +00:00
|
|
|
__typename: "Address" as "Address",
|
2020-01-30 14:34:27 +00:00
|
|
|
city: "Port Danielshire",
|
|
|
|
cityArea: "",
|
|
|
|
companyName: "",
|
|
|
|
country: {
|
2020-01-30 15:37:22 +00:00
|
|
|
__typename: "CountryDisplay" as "CountryDisplay",
|
2020-01-30 14:34:27 +00:00
|
|
|
code: "SE",
|
|
|
|
country: "Szwecja"
|
|
|
|
},
|
|
|
|
countryArea: "",
|
|
|
|
firstName: "Elizabeth",
|
|
|
|
id: "QWRkcmVzczoy",
|
|
|
|
lastName: "Vaughn",
|
|
|
|
phone: "",
|
|
|
|
postalCode: "52203",
|
|
|
|
streetAddress1: "419 Ruiz Orchard Apt. 199",
|
|
|
|
streetAddress2: "0238 Cremin Freeway"
|
|
|
|
};
|