npm-pkg-hook 1.13.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -2
- package/.babelrc +0 -0
- package/.github/pull_request_template.md +0 -18
- package/.github/workflows/pepeline.yaml +0 -30
- package/eslint.config.mts +0 -153
- package/expire.json +0 -1
- package/jsconfig.json +0 -28
- package/script.txt +0 -7
- package/src/config/client/errors.ts +0 -39
- package/src/config/client/index.ts +0 -1
- package/src/config/content/en.json +0 -5
- package/src/config/content/es.json +0 -5
- package/src/config/content/index.ts +0 -16
- package/src/cookies/index.ts +0 -3
- package/src/hooks/addTenMinutes/index.ts +0 -14
- package/src/hooks/calculateLogLatHaversine/index.ts +0 -41
- package/src/hooks/completeSchedules/index.ts +0 -22
- package/src/hooks/convertToMilitaryTime/index.ts +0 -18
- package/src/hooks/generateStoreURL/index.ts +0 -41
- package/src/hooks/generateTemplate/index.ts +0 -66
- package/src/hooks/getCardType/index.ts +0 -24
- package/src/hooks/getCategoriesWithProduct/helpers/index.ts +0 -7
- package/src/hooks/getCategoriesWithProduct/index.ts +0 -62
- package/src/hooks/getGlobalSession/index.ts +0 -69
- package/src/hooks/getSession/index.ts +0 -72
- package/src/hooks/getTodayTimestamps/index.ts +0 -70
- package/src/hooks/getTotalHours/index.ts +0 -76
- package/src/hooks/handleLogin/index.ts +0 -14
- package/src/hooks/index.ts +0 -154
- package/src/hooks/isTokenExpired/index.ts +0 -17
- package/src/hooks/newMessageSubscription/index.ts +0 -28
- package/src/hooks/newStoreOrderSubscription/index.ts +0 -26
- package/src/hooks/statusOpenStores/helpers/index.ts +0 -124
- package/src/hooks/statusOpenStores/index.ts +0 -221
- package/src/hooks/updateExtProductFoodsOptional/index.ts +0 -49
- package/src/hooks/useAcumulateDate/index.ts +0 -18
- package/src/hooks/useAllStoresPendingToRegister/index.ts +0 -37
- package/src/hooks/useAmountInput/index.ts +0 -127
- package/src/hooks/useAnimationFrame/index.ts +0 -45
- package/src/hooks/useAnimationText/index.ts +0 -31
- package/src/hooks/useAsideCart/helpers/index.ts +0 -22
- package/src/hooks/useAsideCart/index.ts +0 -217
- package/src/hooks/useAsideCart/queries.ts +0 -10
- package/src/hooks/useBanner/index.ts +0 -20
- package/src/hooks/useCart/index.ts +0 -2
- package/src/hooks/useCart/queries.ts +0 -174
- package/src/hooks/useCart/useCart/helpers/index.ts +0 -79
- package/src/hooks/useCart/useCart/index.ts +0 -424
- package/src/hooks/useCart/useGetCart/index.ts +0 -34
- package/src/hooks/useCatWithProduct/index.ts +0 -54
- package/src/hooks/useCatWithProduct/queries.ts +0 -200
- package/src/hooks/useCatWithProduct/types/index.ts +0 -104
- package/src/hooks/useCatWithProductClient/index.ts +0 -57
- package/src/hooks/useCatWithProductClient/queries.ts +0 -56
- package/src/hooks/useCategoriesProduct/index.ts +0 -14
- package/src/hooks/useCategoriesProduct/queries.ts +0 -16
- package/src/hooks/useCategoryInStore/index.ts +0 -167
- package/src/hooks/useCategoryInStore/queries.ts +0 -78
- package/src/hooks/useCategoryStore/index.ts +0 -8
- package/src/hooks/useCategoryStore/queries.ts +0 -16
- package/src/hooks/useChartData/index.ts +0 -171
- package/src/hooks/useChartData/useChartData/index.ts +0 -200
- package/src/hooks/useChartData/useChartDataAllOrders/index.ts +0 -94
- package/src/hooks/useChatRoomSubscription/index.ts +0 -28
- package/src/hooks/useCheckbox/index.ts +0 -115
- package/src/hooks/useCities/index.ts +0 -14
- package/src/hooks/useCities/queries.ts +0 -12
- package/src/hooks/useClients/index.ts +0 -97
- package/src/hooks/useClients/queries.ts +0 -215
- package/src/hooks/useColorByLetters/helpers/alea.ts +0 -73
- package/src/hooks/useColorByLetters/helpers/colors.ts +0 -45
- package/src/hooks/useColorByLetters/helpers/index.ts +0 -24
- package/src/hooks/useColorByLetters/helpers/mersenne_twister.ts +0 -118
- package/src/hooks/useColorByLetters/index.ts +0 -24
- package/src/hooks/useConnection/index.ts +0 -24
- package/src/hooks/useCountries/index.ts +0 -20
- package/src/hooks/useCountries/queries.ts +0 -12
- package/src/hooks/useCreateDeliveryTime/index.ts +0 -51
- package/src/hooks/useCreateOrderStatusType/index.ts +0 -134
- package/src/hooks/useCreateProduct/helpers/index.ts +0 -23
- package/src/hooks/useCreateProduct/helpers/manageCacheDataCatProduct/index.ts +0 -52
- package/src/hooks/useCreateProduct/helpers/useEditImageProduct/index.ts +0 -182
- package/src/hooks/useCreateProduct/index.ts +0 -337
- package/src/hooks/useCreateStorePendingToRegister/index.ts +0 -17
- package/src/hooks/useCreateStorePendingToRegister/queries.ts +0 -10
- package/src/hooks/useDashboardComponents/index.ts +0 -50
- package/src/hooks/useDeleteExtraProductFoods/index.ts +0 -13
- package/src/hooks/useDeleteSubProductOptional/index.ts +0 -32
- package/src/hooks/useDeleteSubProductOptional/queries.ts +0 -10
- package/src/hooks/useDeliveryTime/index.ts +0 -29
- package/src/hooks/useDepartments/index.ts +0 -14
- package/src/hooks/useDepartments/queries.ts +0 -13
- package/src/hooks/useDessert/helpers/index.ts +0 -51
- package/src/hooks/useDessert/index.ts +0 -529
- package/src/hooks/useDessertWithPrice/helpers/index.ts +0 -76
- package/src/hooks/useDessertWithPrice/index.ts +0 -381
- package/src/hooks/useDessertWithPrice/queries.ts +0 -18
- package/src/hooks/useDevWS/index.ts +0 -53
- package/src/hooks/useDevices/index.ts +0 -2
- package/src/hooks/useDevices/queries.ts +0 -28
- package/src/hooks/useDevices/useGetDevices.ts +0 -28
- package/src/hooks/useDevices/useRegisterDevices.ts +0 -75
- package/src/hooks/useDownloadReports/helpers/downloadFileFromResponse.ts +0 -21
- package/src/hooks/useDownloadReports/index.ts +0 -2
- package/src/hooks/useDownloadReports/useDownloadReportByDay/index.ts +0 -105
- package/src/hooks/useDownloadReports/useGetReportByDateRange/index.ts +0 -116
- package/src/hooks/useDrag/index.ts +0 -79
- package/src/hooks/useDropzone/index.ts +0 -94
- package/src/hooks/useDynamicAuth/index.ts +0 -14
- package/src/hooks/useDynamicAuth/queries.ts +0 -24
- package/src/hooks/useEditCategory/index.ts +0 -41
- package/src/hooks/useEditOneExtProductFoodOptional/index.ts +0 -28
- package/src/hooks/useEditOneExtProductFoodOptional/queries.ts +0 -16
- package/src/hooks/useEditSubProductOptional/index.ts +0 -12
- package/src/hooks/useEditSubProductOptional/queries.ts +0 -10
- package/src/hooks/useEmployee/index.ts +0 -18
- package/src/hooks/useEmployee/queries.ts +0 -85
- package/src/hooks/useEmployee/useCreateEmployee.ts +0 -90
- package/src/hooks/useEvent/index.ts +0 -34
- package/src/hooks/useFavoriteStores/index.ts +0 -31
- package/src/hooks/useFavoriteStores/queries.ts +0 -54
- package/src/hooks/useFetchJson/index.ts +0 -25
- package/src/hooks/useFetchMoreInteractions/index.jsx +0 -39
- package/src/hooks/useFilterConfigs/index.ts +0 -173
- package/src/hooks/useFingerprintjs/index.ts +0 -197
- package/src/hooks/useFormTools/index.ts +0 -143
- package/src/hooks/useFormatDate/index.ts +0 -91
- package/src/hooks/useFormatNumberPhone/index.ts +0 -23
- package/src/hooks/useFullScreenMode/index.ts +0 -61
- package/src/hooks/useGenerateNumberArray/index.ts +0 -17
- package/src/hooks/useGetAllLocationUser/index.ts +0 -13
- package/src/hooks/useGetAllLocationUser/queries.ts +0 -44
- package/src/hooks/useGetAllSales/index.ts +0 -26
- package/src/hooks/useGetCookies/index.ts +0 -43
- package/src/hooks/useGetExtProductFoodsSubOptionalAll/index.ts +0 -15
- package/src/hooks/useGetFoodRecomended/index.ts +0 -33
- package/src/hooks/useGetFoodRecomended/queries.ts +0 -47
- package/src/hooks/useGetMessagesToRoom/index.ts +0 -23
- package/src/hooks/useGetMinPrice/index.ts +0 -13
- package/src/hooks/useGetMinPrice/queries.ts +0 -7
- package/src/hooks/useGetOneStoreRating/index.ts +0 -41
- package/src/hooks/useGetOneStoreRating/queries.ts +0 -18
- package/src/hooks/useGetSalesAmountToday/index.ts +0 -31
- package/src/hooks/useGetStoreCookie/index.ts +0 -21
- package/src/hooks/useGoogleLogin/index.ts +0 -169
- package/src/hooks/useGoogleLogin/loadScript.ts +0 -15
- package/src/hooks/useGoogleLogin/removeScript.ts +0 -7
- package/src/hooks/useHover/index.ts +0 -32
- package/src/hooks/useImageOptimization/index.ts +0 -32
- package/src/hooks/useImageUploaderProduct/helper/canvasUtils.ts +0 -146
- package/src/hooks/useImageUploaderProduct/helper/getOrientation.ts +0 -54
- package/src/hooks/useImageUploaderProduct/helper/index.ts +0 -5
- package/src/hooks/useImageUploaderProduct/index.ts +0 -295
- package/src/hooks/useImageWeight/index.ts +0 -55
- package/src/hooks/useImagesStore/index.ts +0 -227
- package/src/hooks/useImagesStore/queries.ts +0 -193
- package/src/hooks/useImagesStore/utils/index.ts +0 -4
- package/src/hooks/useIncomingOrders/index.ts +0 -11
- package/src/hooks/useIncomingOrders/queries.ts +0 -87
- package/src/hooks/useInnerHtml/index.ts +0 -39
- package/src/hooks/useIntersection/index.ts +0 -84
- package/src/hooks/useInventory/index.ts +0 -2
- package/src/hooks/useInventory/queries.ts +0 -58
- package/src/hooks/useInventory/useGetProductsInStock.ts +0 -16
- package/src/hooks/useInventory/useUpdateManageStock.ts +0 -41
- package/src/hooks/useKeypress/index.ts +0 -28
- package/src/hooks/useLazyScript/index.ts +0 -74
- package/src/hooks/useLocalBackendIp/index.ts +0 -34
- package/src/hooks/useLocalSorage/index.ts +0 -36
- package/src/hooks/useLocationManager/index.ts +0 -63
- package/src/hooks/useLocationNavigate/index.ts +0 -54
- package/src/hooks/useLoginEmployeeInStore/index.ts +0 -38
- package/src/hooks/useLogout/helpers/BroadcastChannel.ts +0 -74
- package/src/hooks/useLogout/helpers/apiBaseUrl.ts +0 -12
- package/src/hooks/useLogout/helpers/fetchData.ts +0 -37
- package/src/hooks/useLogout/helpers/getCsrfToken.ts +0 -37
- package/src/hooks/useLogout/helpers/index.ts +0 -65
- package/src/hooks/useLogout/helpers/logger.ts +0 -88
- package/src/hooks/useLogout/helpers/parseUrl.ts +0 -39
- package/src/hooks/useLogout/index.ts +0 -105
- package/src/hooks/useManageNewOrder/helpers/index.ts +0 -45
- package/src/hooks/useManageNewOrder/helpers/mock.ts +0 -0
- package/src/hooks/useManageNewOrder/index.ts +0 -104
- package/src/hooks/useManageQueryParams/index.ts +0 -120
- package/src/hooks/useMobile/index.ts +0 -65
- package/src/hooks/useModules/helpers/index.ts +0 -1
- package/src/hooks/useModules/helpers/validateModules.ts +0 -43
- package/src/hooks/useModules/index.ts +0 -124
- package/src/hooks/useMouse/index.ts +0 -55
- package/src/hooks/useMutateHeight/index.ts +0 -36
- package/src/hooks/useOrderClient/index.ts +0 -5
- package/src/hooks/useOrderStatusTypes/index.ts +0 -2
- package/src/hooks/useOrderStatusTypes/useOrderStatusTypes/index.ts +0 -133
- package/src/hooks/useOrderStatusTypes/useUpdateOrderStatusPriorities/index.ts +0 -99
- package/src/hooks/useOrders/index.ts +0 -3
- package/src/hooks/useOrders/queries.ts +0 -99
- package/src/hooks/useOrders/useChangeOrderState/index.ts +0 -128
- package/src/hooks/useOrders/useOrdersFromStore/index.ts +0 -77
- package/src/hooks/usePWAInstall/index.ts +0 -38
- package/src/hooks/usePaymentMethod/index.ts +0 -3
- package/src/hooks/usePaymentMethod/paymentMethod.gql.ts +0 -62
- package/src/hooks/usePaymentMethod/paymentMethod.types.ts +0 -28
- package/src/hooks/usePaymentMethod/useCreatePaymentMethod/index.ts +0 -25
- package/src/hooks/usePaymentMethod/useGetAllPaymentMethods/index.ts +0 -19
- package/src/hooks/usePaymentMethod/useGetPaymentMethod/index.ts +0 -26
- package/src/hooks/usePortFetcher/index.ts +0 -33
- package/src/hooks/usePrintSaleTicket/index.ts +0 -68
- package/src/hooks/useProductsFood/index.ts +0 -341
- package/src/hooks/useProductsFood/queriesStore.ts +0 -964
- package/src/hooks/useProductsFood/types/index.ts +0 -0
- package/src/hooks/useProductsFood/useEditProduct.ts +0 -49
- package/src/hooks/useProductsFood/usetagsProducts.ts +0 -101
- package/src/hooks/useProviders/index.ts +0 -3
- package/src/hooks/useProviders/queries.ts +0 -31
- package/src/hooks/useProviders/useProvidersCreateStore/index.ts +0 -13
- package/src/hooks/useProviders/useProvidersDataStore/index.ts +0 -25
- package/src/hooks/useProvidersStore/index.ts +0 -25
- package/src/hooks/useProvidersStore/queries.ts +0 -31
- package/src/hooks/usePushNotificationOrder/index.ts +0 -52
- package/src/hooks/usePushNotifications/helpers/index.ts +0 -123
- package/src/hooks/usePushNotifications/index.ts +0 -150
- package/src/hooks/useQueryLocationsMap/index.ts +0 -20
- package/src/hooks/useQueryLocationsMap/queries.ts +0 -40
- package/src/hooks/useRatingArrayData/index.ts +0 -54
- package/src/hooks/useRatingArrayData/queries.ts +0 -19
- package/src/hooks/useReactToPrint/index.ts +0 -4
- package/src/hooks/useReactToPrint/index.txt +0 -1223
- package/src/hooks/useRemoveExtraProductFoodsOptional/index.ts +0 -24
- package/src/hooks/useRemoveExtraProductFoodsOptional/queries.ts +0 -48
- package/src/hooks/useReport/index.ts +0 -48
- package/src/hooks/useReport/queries.ts +0 -72
- package/src/hooks/useRestaurant/helpers/index.ts +0 -28
- package/src/hooks/useRestaurant/helpers/manageStatusOpen.ts +0 -26
- package/src/hooks/useRestaurant/index.ts +0 -71
- package/src/hooks/useRestaurant/queries.ts +0 -81
- package/src/hooks/useRoads/index.ts +0 -20
- package/src/hooks/useRoads/queries.ts +0 -13
- package/src/hooks/useRoles/index.ts +0 -4
- package/src/hooks/useRoles/queries.ts +0 -70
- package/src/hooks/useRoles/useCreateRole.ts +0 -40
- package/src/hooks/useRoles/useGetRoles.ts +0 -37
- package/src/hooks/useRoles/useRemoveRoles.ts +0 -40
- package/src/hooks/useRoles/useUpdateRolesPriority.ts +0 -44
- package/src/hooks/useSales/helpers/add-product.utils.ts +0 -120
- package/src/hooks/useSales/helpers/apply-discount-to-cart.utils.ts +0 -292
- package/src/hooks/useSales/helpers/comment-product.utils.ts +0 -41
- package/src/hooks/useSales/helpers/constants/index.ts +0 -38
- package/src/hooks/useSales/helpers/extras.utils.ts +0 -42
- package/src/hooks/useSales/helpers/filterProductsByCarProId.utils.ts +0 -17
- package/src/hooks/useSales/helpers/increment-product-quantity.utils.ts +0 -76
- package/src/hooks/useSales/helpers/index.ts +0 -3
- package/src/hooks/useSales/helpers/initializer.utils.ts +0 -22
- package/src/hooks/useSales/helpers/isStockInsufficient.ts +0 -3
- package/src/hooks/useSales/helpers/remove-product.utils.test.ts +0 -49
- package/src/hooks/useSales/helpers/remove-product.utils.ts +0 -34
- package/src/hooks/useSales/helpers/resolveProduct.ts +0 -29
- package/src/hooks/useSales/helpers/useAddToCart.ts +0 -64
- package/src/hooks/useSales/index.ts +0 -1418
- package/src/hooks/useSales/queries.ts +0 -532
- package/src/hooks/useSales/types/index.ts +0 -206
- package/src/hooks/useSales/types/use-sales.types.ts +0 -8
- package/src/hooks/useSales/useGetSale.ts +0 -21
- package/src/hooks/useSales/useTotalSales.ts +0 -24
- package/src/hooks/useSaveAvailableProduct/helpers/index.ts +0 -38
- package/src/hooks/useSaveAvailableProduct/index.ts +0 -32
- package/src/hooks/useSaveAvailableProduct/queries.ts +0 -10
- package/src/hooks/useSaveLocation/index.ts +0 -17
- package/src/hooks/useSaveLocation/queries.ts +0 -19
- package/src/hooks/useSchedule/index.ts +0 -35
- package/src/hooks/useSchedule/queries.ts +0 -43
- package/src/hooks/useSchedule/schedule.ts +0 -79
- package/src/hooks/useScheduleData/index.ts +0 -135
- package/src/hooks/useScroll/index.ts +0 -56
- package/src/hooks/useScrollRotate/index.ts +0 -16
- package/src/hooks/useSetImageProducts/index.ts +0 -59
- package/src/hooks/useSetImageProducts/queries.ts +0 -18
- package/src/hooks/useSetSession/index.ts +0 -44
- package/src/hooks/useSetState/index.ts +0 -24
- package/src/hooks/useSetupSchedule/helpers/index.ts +0 -85
- package/src/hooks/useSetupSchedule/index.ts +0 -284
- package/src/hooks/useStatusOpenStore/helpers/index.ts +0 -124
- package/src/hooks/useStatusOpenStore/index.ts +0 -195
- package/src/hooks/useStatusOrdersClient/helpers/index.ts +0 -14
- package/src/hooks/useStatusOrdersClient/index.ts +0 -18
- package/src/hooks/useStatusOrdersClient/queries.ts +0 -80
- package/src/hooks/useStock/index.ts +0 -1
- package/src/hooks/useStock/useStockUpdatedAllSubscription.ts +0 -40
- package/src/hooks/useStockMovements/helpers/index.ts +0 -16
- package/src/hooks/useStockMovements/index.ts +0 -39
- package/src/hooks/useStore/index.ts +0 -83
- package/src/hooks/useStore/queries.ts +0 -163
- package/src/hooks/useStoreCalendar/index.ts +0 -5
- package/src/hooks/useStoreContacts/index.ts +0 -53
- package/src/hooks/useStoreContacts/queries.ts +0 -48
- package/src/hooks/useStoreTable/index.ts +0 -2
- package/src/hooks/useStoreTable/queries.ts +0 -47
- package/src/hooks/useStoreTable/useStoreTableCreate.ts +0 -77
- package/src/hooks/useStoreTable/useStoreTables.ts +0 -15
- package/src/hooks/useSubscriptionValidation/index.ts +0 -112
- package/src/hooks/useTagProducts/index.ts +0 -3
- package/src/hooks/useTagProducts/useDeleteOneTag.ts +0 -106
- package/src/hooks/useTagProducts/useGetAllTags.ts +0 -68
- package/src/hooks/useTagProducts/useRegisterMultipleTags.ts +0 -157
- package/src/hooks/useTheme/index.ts +0 -65
- package/src/hooks/useTimeAgo/useTimeAgo.ts +0 -39
- package/src/hooks/useTokenCards/index.ts +0 -45
- package/src/hooks/useTopProductsMovements/index.ts +0 -27
- package/src/hooks/useTotalAllSales/index.ts +0 -25
- package/src/hooks/useTotalProductsInStock/index.ts +0 -23
- package/src/hooks/useTotalProductsSold/index.ts +0 -23
- package/src/hooks/useTotalProductsSolded/index.ts +0 -20
- package/src/hooks/useUpdateCart/index.ts +0 -131
- package/src/hooks/useUpdateCartCookie/index.ts +0 -60
- package/src/hooks/useUpdateDashboardComponent/index.ts +0 -91
- package/src/hooks/useUpdateExistingOrders/index.ts +0 -85
- package/src/hooks/useUpdateExtProductFoodsSubOptional/index.ts +0 -61
- package/src/hooks/useUpdateModuleOrder/index.ts +0 -37
- package/src/hooks/useUpdateMultipleExtProduct/index.ts +0 -34
- package/src/hooks/useUpdateMultipleExtProduct/queries.ts +0 -33
- package/src/hooks/useUpdateMultipleProducts/index.ts +0 -117
- package/src/hooks/useUpdateMultipleProducts/queries.ts +0 -51
- package/src/hooks/useUploadProducts/helpers/index.ts +0 -1
- package/src/hooks/useUploadProducts/helpers/parseNumber.ts +0 -37
- package/src/hooks/useUploadProducts/helpers/validateProductDataExcel.ts +0 -73
- package/src/hooks/useUploadProducts/index.ts +0 -442
- package/src/hooks/useUpsertGoal/index.ts +0 -68
- package/src/hooks/useUser/index.ts +0 -24
- package/src/hooks/useUser/queries.ts +0 -131
- package/src/hooks/useWeeklyStockMovement/helpers/index.ts +0 -32
- package/src/hooks/useWeeklyStockMovement/index.ts +0 -52
- package/src/hooks/useWindowSize/index.ts +0 -45
- package/src/index.ts +0 -11
- package/src/mock/dessert/index.ts +0 -16
- package/src/mock/index.ts +0 -1
- package/src/security/index.ts +0 -1
- package/src/services/index.ts +0 -1
- package/src/utils/UtilDateRange.ts +0 -56
- package/src/utils/generateCode.ts +0 -222
- package/src/utils/index.ts +0 -2
- package/src/utils/utils.ts +0 -344
- package/tsconfig.eslint.json +0 -16
- package/tsconfig.json +0 -21
- package/tsup.config.ts +0 -24
|
@@ -1,532 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client'
|
|
2
|
-
|
|
3
|
-
export const GET_ALL_SALES = gql`
|
|
4
|
-
query getAllSalesStore {
|
|
5
|
-
getAllSalesStore {
|
|
6
|
-
change
|
|
7
|
-
channel
|
|
8
|
-
status
|
|
9
|
-
createdAt
|
|
10
|
-
pCodeRef
|
|
11
|
-
idStore
|
|
12
|
-
pdpId
|
|
13
|
-
locationUser
|
|
14
|
-
shoppingCartRefCode
|
|
15
|
-
statusOrder {
|
|
16
|
-
idStatus
|
|
17
|
-
name
|
|
18
|
-
description
|
|
19
|
-
color
|
|
20
|
-
backgroundColor
|
|
21
|
-
priority
|
|
22
|
-
state
|
|
23
|
-
createdAt
|
|
24
|
-
updatedAt
|
|
25
|
-
}
|
|
26
|
-
updatedAt
|
|
27
|
-
totalProductsPrice
|
|
28
|
-
unidProducts
|
|
29
|
-
getUser {
|
|
30
|
-
associateStore
|
|
31
|
-
avatar
|
|
32
|
-
createdAt
|
|
33
|
-
id
|
|
34
|
-
email
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
export const GET_ALL_COUNT_SALES = gql`
|
|
42
|
-
query getTodaySales {
|
|
43
|
-
getTodaySales
|
|
44
|
-
}
|
|
45
|
-
`
|
|
46
|
-
export const GET_ALL_SALES_STATISTICS = gql`
|
|
47
|
-
query getAllSalesStoreStatistic(
|
|
48
|
-
$idStore: ID
|
|
49
|
-
$search: String
|
|
50
|
-
$min: Int
|
|
51
|
-
$max: Int
|
|
52
|
-
$fromDate: DateTime
|
|
53
|
-
$toDate: DateTime
|
|
54
|
-
) {
|
|
55
|
-
getAllSalesStoreStatistic(
|
|
56
|
-
idStore: $idStore
|
|
57
|
-
search: $search
|
|
58
|
-
min: $min
|
|
59
|
-
max: $max
|
|
60
|
-
toDate: $toDate
|
|
61
|
-
fromDate: $fromDate
|
|
62
|
-
) {
|
|
63
|
-
pdpId
|
|
64
|
-
idStore
|
|
65
|
-
pCodeRef
|
|
66
|
-
payId
|
|
67
|
-
pPRecoger
|
|
68
|
-
totalProductsPrice
|
|
69
|
-
pSState
|
|
70
|
-
pDatCre
|
|
71
|
-
locationUser
|
|
72
|
-
pDatMod
|
|
73
|
-
getAllPedidoStore {
|
|
74
|
-
pdpId
|
|
75
|
-
pId
|
|
76
|
-
idStore
|
|
77
|
-
ShoppingCard
|
|
78
|
-
pCodeRef
|
|
79
|
-
pPStateP
|
|
80
|
-
payId
|
|
81
|
-
pPRecoger
|
|
82
|
-
pDatCre
|
|
83
|
-
pDatMod
|
|
84
|
-
getAllShoppingCard {
|
|
85
|
-
ShoppingCard
|
|
86
|
-
comments
|
|
87
|
-
cantProducts
|
|
88
|
-
pId
|
|
89
|
-
productFood {
|
|
90
|
-
pId
|
|
91
|
-
carProId
|
|
92
|
-
colorId
|
|
93
|
-
idStore
|
|
94
|
-
pName
|
|
95
|
-
ProPrice
|
|
96
|
-
ProDescuento
|
|
97
|
-
ProDescription
|
|
98
|
-
ValueDelivery
|
|
99
|
-
ProImage
|
|
100
|
-
ProStar
|
|
101
|
-
pState
|
|
102
|
-
pDatCre
|
|
103
|
-
pDatMod
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
`
|
|
110
|
-
|
|
111
|
-
export const CREATE_CLIENTS = gql`
|
|
112
|
-
mutation createClients($input: IClients) {
|
|
113
|
-
createClients(input: $input) {
|
|
114
|
-
cliId
|
|
115
|
-
idStore
|
|
116
|
-
idUser
|
|
117
|
-
clState
|
|
118
|
-
ClientAddress
|
|
119
|
-
clientNumber
|
|
120
|
-
ccClient
|
|
121
|
-
gender
|
|
122
|
-
clientLastName
|
|
123
|
-
clientName
|
|
124
|
-
createAt
|
|
125
|
-
updateAt
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
`
|
|
129
|
-
export const DELETE_ONE_CLIENTS = gql`
|
|
130
|
-
mutation deleteClient($cliId: ID, $clState: Int!) {
|
|
131
|
-
deleteClient(cliId: $cliId, clState: $clState) {
|
|
132
|
-
success
|
|
133
|
-
message
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
`
|
|
137
|
-
export const GET_ALL_CLIENTS = gql`
|
|
138
|
-
query getAllClients(
|
|
139
|
-
$idStore: ID
|
|
140
|
-
$cId: ID
|
|
141
|
-
$dId: ID
|
|
142
|
-
$ctId: ID
|
|
143
|
-
$search: String
|
|
144
|
-
$min: Int
|
|
145
|
-
$max: Int
|
|
146
|
-
$fromDate: DateTime
|
|
147
|
-
$toDate: DateTime
|
|
148
|
-
) {
|
|
149
|
-
getAllClients(
|
|
150
|
-
idStore: $idStore
|
|
151
|
-
cId: $cId
|
|
152
|
-
dId: $dId
|
|
153
|
-
ctId: $ctId
|
|
154
|
-
search: $search
|
|
155
|
-
min: $min
|
|
156
|
-
max: $max
|
|
157
|
-
fromDate: $fromDate
|
|
158
|
-
toDate: $toDate
|
|
159
|
-
) {
|
|
160
|
-
cliId
|
|
161
|
-
idStore
|
|
162
|
-
gender
|
|
163
|
-
# idUser
|
|
164
|
-
clState
|
|
165
|
-
clientNumber
|
|
166
|
-
ccClient
|
|
167
|
-
clientLastName
|
|
168
|
-
clientName
|
|
169
|
-
ClientAddress
|
|
170
|
-
createAt
|
|
171
|
-
updateAt
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
`
|
|
175
|
-
export const GET_ONE_CLIENT = gql`
|
|
176
|
-
query getOneClients($cliId: ID) {
|
|
177
|
-
getOneClients(cliId: $cliId) {
|
|
178
|
-
cliId
|
|
179
|
-
idStore
|
|
180
|
-
idUser
|
|
181
|
-
clState
|
|
182
|
-
clientNumber
|
|
183
|
-
ClientAddress
|
|
184
|
-
gender
|
|
185
|
-
ccClient
|
|
186
|
-
clientLastName
|
|
187
|
-
clientName
|
|
188
|
-
createAt
|
|
189
|
-
updateAt
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
`
|
|
193
|
-
|
|
194
|
-
export const CREATE_SHOPPING_CARD = gql`
|
|
195
|
-
mutation registerShoppingCard(
|
|
196
|
-
$input: IShoppingCard
|
|
197
|
-
$idSubArray: IID_SUB_ITEMS
|
|
198
|
-
) {
|
|
199
|
-
registerShoppingCard(input: $input, idSubArray: $idSubArray) {
|
|
200
|
-
ShoppingCard
|
|
201
|
-
id
|
|
202
|
-
pId
|
|
203
|
-
subProductsId
|
|
204
|
-
ShoppingCardRefCode
|
|
205
|
-
uuid
|
|
206
|
-
discountCardProduct
|
|
207
|
-
idUser
|
|
208
|
-
cName
|
|
209
|
-
idStore
|
|
210
|
-
cState
|
|
211
|
-
cDatCre
|
|
212
|
-
cDatMod
|
|
213
|
-
csDescription
|
|
214
|
-
cantProducts
|
|
215
|
-
comments
|
|
216
|
-
# idSubArray
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
`
|
|
220
|
-
export const GET_ONE_SALE = gql`
|
|
221
|
-
query getOneSalesStore($pCodeRef: String) {
|
|
222
|
-
getOneSalesStore(pCodeRef: $pCodeRef) {
|
|
223
|
-
message
|
|
224
|
-
message
|
|
225
|
-
errors {
|
|
226
|
-
message
|
|
227
|
-
path
|
|
228
|
-
type
|
|
229
|
-
context {
|
|
230
|
-
key
|
|
231
|
-
label
|
|
232
|
-
limit
|
|
233
|
-
value
|
|
234
|
-
__typename
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
data {
|
|
238
|
-
statusOrder {
|
|
239
|
-
idStatus
|
|
240
|
-
name
|
|
241
|
-
description
|
|
242
|
-
color
|
|
243
|
-
backgroundColor
|
|
244
|
-
priority
|
|
245
|
-
state
|
|
246
|
-
createdAt
|
|
247
|
-
updatedAt
|
|
248
|
-
}
|
|
249
|
-
paymentMethod {
|
|
250
|
-
payId
|
|
251
|
-
name
|
|
252
|
-
icon
|
|
253
|
-
state
|
|
254
|
-
paymentPriority
|
|
255
|
-
createdAt
|
|
256
|
-
updatedAt
|
|
257
|
-
}
|
|
258
|
-
totals {
|
|
259
|
-
name
|
|
260
|
-
value
|
|
261
|
-
}
|
|
262
|
-
createdAt
|
|
263
|
-
change
|
|
264
|
-
channel
|
|
265
|
-
pCodeRef
|
|
266
|
-
id
|
|
267
|
-
locationUser
|
|
268
|
-
pCodeRef
|
|
269
|
-
pdpId
|
|
270
|
-
ppState
|
|
271
|
-
ppState
|
|
272
|
-
shoppingCartRefCode
|
|
273
|
-
pSState
|
|
274
|
-
totalProductsPrice
|
|
275
|
-
unidProducts
|
|
276
|
-
updatedAt
|
|
277
|
-
createdAt
|
|
278
|
-
store {
|
|
279
|
-
addressStore
|
|
280
|
-
banner
|
|
281
|
-
cId
|
|
282
|
-
createdAt
|
|
283
|
-
dailyGoal
|
|
284
|
-
description
|
|
285
|
-
upLon
|
|
286
|
-
upLat
|
|
287
|
-
deliveryTimeMinutes
|
|
288
|
-
emailStore
|
|
289
|
-
documentIdentifier
|
|
290
|
-
Viaprincipal
|
|
291
|
-
uState
|
|
292
|
-
}
|
|
293
|
-
client {
|
|
294
|
-
cliId
|
|
295
|
-
idStore
|
|
296
|
-
idUser
|
|
297
|
-
clState
|
|
298
|
-
clientNumber
|
|
299
|
-
ClientAddress
|
|
300
|
-
ccClient
|
|
301
|
-
gender
|
|
302
|
-
clientLastName
|
|
303
|
-
clientName
|
|
304
|
-
createAt
|
|
305
|
-
updateAt
|
|
306
|
-
}
|
|
307
|
-
shoppingCarts {
|
|
308
|
-
shoppingCartId
|
|
309
|
-
id
|
|
310
|
-
pId
|
|
311
|
-
shoppingCartRefCode
|
|
312
|
-
priceProduct
|
|
313
|
-
comments
|
|
314
|
-
cantProducts
|
|
315
|
-
refCodePid
|
|
316
|
-
idUser
|
|
317
|
-
idStore
|
|
318
|
-
sState
|
|
319
|
-
createdAt
|
|
320
|
-
updatedAt
|
|
321
|
-
products {
|
|
322
|
-
pId
|
|
323
|
-
carProId
|
|
324
|
-
sizeId
|
|
325
|
-
colorId
|
|
326
|
-
idStore
|
|
327
|
-
cId
|
|
328
|
-
caId
|
|
329
|
-
dId
|
|
330
|
-
ctId
|
|
331
|
-
tpId
|
|
332
|
-
fId
|
|
333
|
-
pName
|
|
334
|
-
pCode
|
|
335
|
-
ProPrice
|
|
336
|
-
free
|
|
337
|
-
ProDescuento
|
|
338
|
-
ProUniDisponibles
|
|
339
|
-
ProDescription
|
|
340
|
-
ValueDelivery
|
|
341
|
-
ProProtegido
|
|
342
|
-
ProAssurance
|
|
343
|
-
ProImage
|
|
344
|
-
ProStar
|
|
345
|
-
ProWidth
|
|
346
|
-
ProHeight
|
|
347
|
-
ProLength
|
|
348
|
-
ProWeight
|
|
349
|
-
ProQuantity
|
|
350
|
-
ProOutstanding
|
|
351
|
-
ProDelivery
|
|
352
|
-
ProVoltaje
|
|
353
|
-
pState
|
|
354
|
-
tgId
|
|
355
|
-
sTateLogistic
|
|
356
|
-
ProBarCode
|
|
357
|
-
stock
|
|
358
|
-
manageStock
|
|
359
|
-
vat
|
|
360
|
-
ExtProductFoodOptional {
|
|
361
|
-
pId
|
|
362
|
-
opExPid
|
|
363
|
-
OptionalProName
|
|
364
|
-
state
|
|
365
|
-
code
|
|
366
|
-
required
|
|
367
|
-
numbersOptionalOnly
|
|
368
|
-
createdAt
|
|
369
|
-
updatedAt
|
|
370
|
-
ExtProductFoodsSubOptionalAll {
|
|
371
|
-
pId
|
|
372
|
-
opExPid
|
|
373
|
-
idStore
|
|
374
|
-
opSubExPid
|
|
375
|
-
OptionalSubProName
|
|
376
|
-
exCodeOptionExtra
|
|
377
|
-
exCode
|
|
378
|
-
state
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
ExtProductFoodsAll {
|
|
382
|
-
pId
|
|
383
|
-
exPid
|
|
384
|
-
exState
|
|
385
|
-
extraName
|
|
386
|
-
extraPrice
|
|
387
|
-
quantity
|
|
388
|
-
newExtraPrice
|
|
389
|
-
state
|
|
390
|
-
createdAt
|
|
391
|
-
updatedAt
|
|
392
|
-
}
|
|
393
|
-
createdAt
|
|
394
|
-
updatedAt
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
__typename
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
`
|
|
402
|
-
export const CREATE_SHOPPING_CARD_TO_USER_STORE = gql`
|
|
403
|
-
mutation registerSalesStore(
|
|
404
|
-
$input: [IShoppingCart]
|
|
405
|
-
$id: ID
|
|
406
|
-
$tableId: ID
|
|
407
|
-
$discount: DiscountInput
|
|
408
|
-
$idStore: ID
|
|
409
|
-
$pCodeRef: String
|
|
410
|
-
$change: Float
|
|
411
|
-
$shoppingCartRefCode: String
|
|
412
|
-
$payId: ID
|
|
413
|
-
$pickUp: Int
|
|
414
|
-
$totalProductsPrice: Float
|
|
415
|
-
$valueDelivery: Float
|
|
416
|
-
$idSubArray: IID_SUB_ITEMS
|
|
417
|
-
) {
|
|
418
|
-
registerSalesStore(
|
|
419
|
-
input: $input
|
|
420
|
-
id: $id
|
|
421
|
-
tableId: $tableId
|
|
422
|
-
discount: $discount
|
|
423
|
-
shoppingCartRefCode: $shoppingCartRefCode
|
|
424
|
-
idStore: $idStore
|
|
425
|
-
pCodeRef: $pCodeRef
|
|
426
|
-
change: $change
|
|
427
|
-
|
|
428
|
-
payId: $payId
|
|
429
|
-
pickUp: $pickUp
|
|
430
|
-
totalProductsPrice: $totalProductsPrice
|
|
431
|
-
valueDelivery: $valueDelivery
|
|
432
|
-
idSubArray: $idSubArray
|
|
433
|
-
) {
|
|
434
|
-
success
|
|
435
|
-
message
|
|
436
|
-
errors {
|
|
437
|
-
path
|
|
438
|
-
message
|
|
439
|
-
type
|
|
440
|
-
context {
|
|
441
|
-
limit
|
|
442
|
-
value
|
|
443
|
-
label
|
|
444
|
-
key
|
|
445
|
-
__typename
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
data {
|
|
449
|
-
pCodeRef
|
|
450
|
-
idStore
|
|
451
|
-
id
|
|
452
|
-
channel
|
|
453
|
-
payId
|
|
454
|
-
pSState
|
|
455
|
-
createdAt
|
|
456
|
-
updatedAt
|
|
457
|
-
unidProducts
|
|
458
|
-
totalProductsPrice
|
|
459
|
-
getOneStore {
|
|
460
|
-
idStore
|
|
461
|
-
cId
|
|
462
|
-
dId
|
|
463
|
-
catStore
|
|
464
|
-
scheduleOpenAll
|
|
465
|
-
dailyGoal
|
|
466
|
-
deliveryTimeMinutes
|
|
467
|
-
}
|
|
468
|
-
getUser {
|
|
469
|
-
id
|
|
470
|
-
name
|
|
471
|
-
email
|
|
472
|
-
createdAt
|
|
473
|
-
updatedAt
|
|
474
|
-
__typename
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
`
|
|
480
|
-
|
|
481
|
-
export const GET_ALL_ORDER = gql`
|
|
482
|
-
query getAllOrderStoreFinal($idStore: ID, $search: String, $min: Int, $max: Int, $statusOrder: Int) {
|
|
483
|
-
getAllOrderStoreFinal(idStore: $idStore, search: $search, min: $min, max: $max, statusOrder: $statusOrder) {
|
|
484
|
-
pdpId
|
|
485
|
-
idStore
|
|
486
|
-
pCodeRef
|
|
487
|
-
payId
|
|
488
|
-
pPRecoger
|
|
489
|
-
totalProductsPrice
|
|
490
|
-
pSState
|
|
491
|
-
pDatCre
|
|
492
|
-
channel
|
|
493
|
-
locationUser
|
|
494
|
-
pDatMod
|
|
495
|
-
getAllPedidoStore{
|
|
496
|
-
pdpId
|
|
497
|
-
pId
|
|
498
|
-
idStore
|
|
499
|
-
ShoppingCard
|
|
500
|
-
pCodeRef
|
|
501
|
-
pPStateP
|
|
502
|
-
payId
|
|
503
|
-
pPRecoger
|
|
504
|
-
pDatCre
|
|
505
|
-
pDatMod
|
|
506
|
-
getAllShoppingCard {
|
|
507
|
-
ShoppingCard
|
|
508
|
-
priceProduct
|
|
509
|
-
comments
|
|
510
|
-
cantProducts
|
|
511
|
-
pId
|
|
512
|
-
productFood{
|
|
513
|
-
pId
|
|
514
|
-
carProId
|
|
515
|
-
colorId
|
|
516
|
-
idStore
|
|
517
|
-
pName
|
|
518
|
-
ProPrice
|
|
519
|
-
ProDescuento
|
|
520
|
-
ProDescription
|
|
521
|
-
ValueDelivery
|
|
522
|
-
ProImage
|
|
523
|
-
ProStar
|
|
524
|
-
pState
|
|
525
|
-
pDatCre
|
|
526
|
-
pDatMod
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
`
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { TypeDiscount } from '../helpers/apply-discount-to-cart.utils'
|
|
2
|
-
import { SalesActionTypes } from '../helpers/constants'
|
|
3
|
-
/**
|
|
4
|
-
* Basic notification payload used across hook
|
|
5
|
-
*/
|
|
6
|
-
export interface NotificationPayload {
|
|
7
|
-
title?: string
|
|
8
|
-
description?: string
|
|
9
|
-
backgroundColor?: 'success' | 'error' | 'warning' | 'info'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface SalesState {
|
|
13
|
-
PRODUCT: any[];
|
|
14
|
-
totalPrice: number;
|
|
15
|
-
sortBy: string | null;
|
|
16
|
-
itemsInCart: number;
|
|
17
|
-
animateType: string;
|
|
18
|
-
startAnimateUp: string;
|
|
19
|
-
priceRange: number;
|
|
20
|
-
counter: number;
|
|
21
|
-
totalAmount: number;
|
|
22
|
-
payId: string;
|
|
23
|
-
discountType: TypeDiscount;
|
|
24
|
-
discountPercent: number;
|
|
25
|
-
discountAmount: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Basic product model as returned by productsFood (server model).
|
|
30
|
-
* Add fields as your GraphQL schema evolves; keep server -> client mapping explicit.
|
|
31
|
-
*/
|
|
32
|
-
export interface ProductFood {
|
|
33
|
-
pId: string
|
|
34
|
-
pName: string
|
|
35
|
-
ProPrice: number
|
|
36
|
-
unitPrice?: number
|
|
37
|
-
stock?: number
|
|
38
|
-
manageStock?: boolean
|
|
39
|
-
ProQuantity?: number
|
|
40
|
-
existsInSale?: boolean
|
|
41
|
-
// allow extra server metadata
|
|
42
|
-
[key: string]: any
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Extra product attached to a product inside cart.
|
|
47
|
-
*/
|
|
48
|
-
export interface ExtraItem {
|
|
49
|
-
exPid: string
|
|
50
|
-
extraPrice: number
|
|
51
|
-
quantity: number
|
|
52
|
-
newExtraPrice?: number
|
|
53
|
-
__typename?: string
|
|
54
|
-
[key: string]: any
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Sub option element for optional groups
|
|
59
|
-
*/
|
|
60
|
-
export interface SubOptionalItem {
|
|
61
|
-
opSubExPid: string
|
|
62
|
-
name?: string
|
|
63
|
-
check?: boolean
|
|
64
|
-
price?: number
|
|
65
|
-
__typename?: string
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Optional group of sub options
|
|
70
|
-
*/
|
|
71
|
-
export interface OptionalGroup {
|
|
72
|
-
opExPid: string
|
|
73
|
-
name?: string
|
|
74
|
-
ExtProductFoodsSubOptionalAll: SubOptionalItem[]
|
|
75
|
-
code?: string
|
|
76
|
-
__typename?: string
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Item stored inside the sales reducer PRODUCT array.
|
|
82
|
-
*/
|
|
83
|
-
export interface SaleProduct {
|
|
84
|
-
pId: string
|
|
85
|
-
pName?: string
|
|
86
|
-
// quantity currently chosen
|
|
87
|
-
ProQuantity: number
|
|
88
|
-
// total price for the quantity (without extras)
|
|
89
|
-
ProPrice: number
|
|
90
|
-
unitPrice?: number
|
|
91
|
-
comment?: string
|
|
92
|
-
dataExtra?: ExtraItem[]
|
|
93
|
-
dataOptional?: OptionalGroup[]
|
|
94
|
-
free?: boolean
|
|
95
|
-
editing?: boolean
|
|
96
|
-
oldQuantity?: number
|
|
97
|
-
// additional UI-only helpers
|
|
98
|
-
refCodePid?: string
|
|
99
|
-
[key: string]: any
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export type SalesReducerAction =
|
|
103
|
-
| { type: SalesActionTypes.ADD_TO_CART; payload: ProductFood }
|
|
104
|
-
| { type: SalesActionTypes.ADD_PRODUCT; payload: SaleProduct }
|
|
105
|
-
| { type: SalesActionTypes.REMOVE_PRODUCT; payload: { pId: string } }
|
|
106
|
-
| { type: SalesActionTypes.REMOVE_PRODUCT_TO_CART; payload: { pId: string; ProQuantity: number } }
|
|
107
|
-
| { type: SalesActionTypes.ON_CHANGE; payload: { payload: { value: number; index: number; id: string } } }
|
|
108
|
-
| { type: SalesActionTypes.UPDATE_SUCCESS_QUANTITY_EDITING_PRODUCT; payload: { payload: { pId: string } } }
|
|
109
|
-
| { type: SalesActionTypes.CANCEL_UPDATE_QUANTITY_EDITING_PRODUCT; payload: { payload: { pId: string } } }
|
|
110
|
-
| { type: SalesActionTypes.REMOVE_ALL_PRODUCTS }
|
|
111
|
-
| { type: SalesActionTypes.TOGGLE_FREE_PRODUCT; payload: { pId: string } }
|
|
112
|
-
| { type: SalesActionTypes.TOGGLE_EDITING_PRODUCT; payload: { payload: { pId: string } } }
|
|
113
|
-
| { type: SalesActionTypes.INCREMENT; id: string }
|
|
114
|
-
| { type: SalesActionTypes.PUT_COMMENT; payload: string, value: string }
|
|
115
|
-
| { type: SalesActionTypes.PUT_EXTRA_PRODUCTS_AND_OPTIONAL_PRODUCT; payload: string; dataOptional?: OptionalGroup[]; dataExtra?: ExtraItem[] }
|
|
116
|
-
| { type: SalesActionTypes.PRICE_RANGE; payload: number }
|
|
117
|
-
| { type: SalesActionTypes.SORT; payload: string }
|
|
118
|
-
| { type: SalesActionTypes.DECREMENT }
|
|
119
|
-
| { type: SalesActionTypes.PAYMENT_METHOD; payload: string }
|
|
120
|
-
| { type: SalesActionTypes.APPLY_DISCOUNT; payload: any }
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Values used in forms (change, client id, comments etc)
|
|
125
|
-
*/
|
|
126
|
-
export interface ValuesState {
|
|
127
|
-
change: string | number
|
|
128
|
-
cliId: string | null
|
|
129
|
-
comment: string
|
|
130
|
-
tableId: string | null
|
|
131
|
-
valueDelivery: string | number
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Hook return shape — keep in sync with actual returned object.
|
|
136
|
-
* Export a minimal public API so consumers only see typed surface.
|
|
137
|
-
*/
|
|
138
|
-
export interface UseSalesReturn {
|
|
139
|
-
loading: boolean
|
|
140
|
-
loadingExtraProduct: boolean
|
|
141
|
-
disabledModalItems: boolean
|
|
142
|
-
loadingRegisterSale: boolean
|
|
143
|
-
errorSale: boolean
|
|
144
|
-
openCurrentSale: boolean | null
|
|
145
|
-
code: string | null
|
|
146
|
-
totalProductPrice: number
|
|
147
|
-
saveDataState: any
|
|
148
|
-
product: { PRODUCT: { pId: string | null } }
|
|
149
|
-
data: SalesState
|
|
150
|
-
openCommentModal: boolean
|
|
151
|
-
inputValue: string
|
|
152
|
-
arrayProduct: any[]
|
|
153
|
-
delivery: boolean
|
|
154
|
-
valuesDates: { fromDate: string; toDate?: string }
|
|
155
|
-
print: boolean
|
|
156
|
-
finalFilter: any[]
|
|
157
|
-
showMore: number
|
|
158
|
-
search: string
|
|
159
|
-
values: ValuesState
|
|
160
|
-
initialStateSales: SalesState
|
|
161
|
-
productsFood: ProductFood[]
|
|
162
|
-
modalItem: boolean
|
|
163
|
-
sumExtraProducts: number
|
|
164
|
-
oneProductToComment: any
|
|
165
|
-
dataProduct: any
|
|
166
|
-
dataOptional: OptionalGroup[]
|
|
167
|
-
dataExtra: ExtraItem[]
|
|
168
|
-
fetchMore: Function
|
|
169
|
-
pagination: any
|
|
170
|
-
discount: number
|
|
171
|
-
datCat: any[]
|
|
172
|
-
currentPage: number
|
|
173
|
-
loadingProduct: boolean
|
|
174
|
-
handleChangeCheck: (caId: string) => void
|
|
175
|
-
errors: Record<string, boolean>
|
|
176
|
-
handleUpdateAllExtra: () => void
|
|
177
|
-
handleAddAllProductsToCart: () => void
|
|
178
|
-
dispatch: React.Dispatch<SalesReducerAction>
|
|
179
|
-
handlePageChange: (pageNumber: number) => void
|
|
180
|
-
handleComment: (product: any) => void
|
|
181
|
-
setModalItem: (v: boolean) => void
|
|
182
|
-
handleChangeFilter: (value: string) => void
|
|
183
|
-
handleProduct: (PRODUCT: any) => Promise<void>
|
|
184
|
-
handleChange: (e: React.ChangeEvent<HTMLInputElement> | { target: { name: string; value: any } }, error: boolean) => void
|
|
185
|
-
setOpenCurrentSale: (v: any) => void
|
|
186
|
-
setErrors: (e: any) => void
|
|
187
|
-
onChangeInput: (e: React.ChangeEvent<HTMLInputElement>) => void
|
|
188
|
-
handleAddProduct: (product: any) => Promise<void>
|
|
189
|
-
handleRemoveValue: ({ name, value, pId }: { name: string; value: any; pId: string }) => void
|
|
190
|
-
setDelivery: (v: boolean) => void
|
|
191
|
-
setValues: (v: ValuesState) => void
|
|
192
|
-
setShowMore: (n: number) => void
|
|
193
|
-
PriceRangeFunc: (products: any[], price: number) => any[]
|
|
194
|
-
handleCleanFilter: () => null
|
|
195
|
-
handleSubmit: () => void
|
|
196
|
-
handleChangeFilterProduct: (e: React.ChangeEvent<HTMLInputElement>) => void
|
|
197
|
-
handleDecrementExtra: ({ Adicionales }: { Adicionales: any }) => void
|
|
198
|
-
setTotalProductPrice: (n: number) => void
|
|
199
|
-
setInputValue: (s: string) => void
|
|
200
|
-
getSortedProduct: (data: any[], sort: string) => any[]
|
|
201
|
-
handleAddOptional: ({ exOptional, codeCategory }: { exOptional?: string | null; codeCategory?: string | null }) => void
|
|
202
|
-
handleIncrementExtra: ({ Adicionales, index }: { Adicionales: any; index?: number }) => void
|
|
203
|
-
setProduct: (p: any) => void
|
|
204
|
-
setPrint: () => void
|
|
205
|
-
PRODUCT: (state: SalesState, action: SalesReducerAction) => SalesState
|
|
206
|
-
}
|