@feedmepos/mf-inventory-portal 0.0.22-dev.34 → 0.0.22-dev.37
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/{ApprovalView-2pX2IV1F.js → ApprovalView-Dco0PkEf.js} +8 -8
- package/dist/{BindingsDialog-EyImpE9g.js → BindingsDialog-DrCU_kIA.js} +9 -9
- package/dist/{BindingsPicker-CbBNBcWW.js → BindingsPicker-BMIIrlG6.js} +17 -17
- package/dist/{BindingsTable-CJeV7Dd2.js → BindingsTable-BHRmkL1P.js} +1 -1
- package/dist/{ClosingTemplateView-BDEooji1.js → ClosingTemplateView-kiej8Nah.js} +15 -15
- package/dist/FmDroppableField-Bl7A98it.js +152 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZtc5R4Z.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DQw4pBwH.js} +25 -25
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBh79EM_.js} +20 -20
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-3OkJNtvH.js +51 -0
- package/dist/IngredientsView-m44wAwSR.js +1611 -0
- package/dist/{IntegrationView-1lXCciJp.js → IntegrationView-B4gCx21K.js} +71 -71
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bgd922-L.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D1frNXtV.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Bexig132.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dbs29jm_.js} +16 -16
- package/dist/{PurchaseOrderPrintPreview-036mLqRD.js → PurchaseOrderPrintPreview-lKu0y_xw.js} +7 -7
- package/dist/ReceiveRequestView-DflWKxgq.js +4053 -0
- package/dist/{RecipeView-BuiA-2uY.js → RecipeView-DfsXdlPn.js} +30 -29
- package/dist/StockView-BSeSpxkV.js +7762 -0
- package/dist/{SupplierView-Ck5hH5gT.js → SupplierView-DPWh1si_.js} +11 -11
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DFDc3P3S.js → TransferDetails.vue_vue_type_script_setup_true_lang-Dt1lRW3W.js} +260 -262
- package/dist/TransferTemplateView-DGOT4oZN.js +2054 -0
- package/dist/{UnitView-DB2hQFMC.js → UnitView-X9bCqAWe.js} +16 -16
- package/dist/{WarehouseView-CFJiuhpx.js → WarehouseView-BphA-Peq.js} +20 -20
- package/dist/api/bill.d.ts +84 -238
- package/dist/api/purchase-order-template.d.ts +4 -2
- package/dist/{app-Z9P39kGh.js → app-DZiCiBV7.js} +18175 -18188
- package/dist/app.js +2 -2
- package/dist/{decimal-DIe_fFDH.js → decimal-Bx1Y3uW1.js} +1 -1
- package/dist/defineDeepModel-4XZbatJF.js +13 -0
- package/dist/format-time-from-id-CFJvgP70.js +15 -0
- package/dist/helper/xlsx.util.d.ts +7 -0
- package/dist/purchase-order-transaction-type-Ds7YRAAp.js +348 -0
- package/dist/stores/inventory.d.ts +63 -0
- package/dist/stores/location.d.ts +89 -0
- package/dist/stores/netsuite.d.ts +1 -0
- package/dist/stores/supplier.d.ts +120 -3
- package/dist/stores/warehouse.d.ts +7 -4
- package/dist/supplier-BhJT8KOX.js +70 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-CeSeHnX0.js → use-template-enabled-locations-2-BrEPVOpT.js} +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +2 -2
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +44 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +42 -34
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +75 -51
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +75 -51
- package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
- package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +10 -6
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1850 -5
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
- package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -230
- package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
- package/dist/{xlsx-DrDljHnF.js → xlsx-B9lpxKgq.js} +651 -651
- package/dist/xlsx.util-DP5wVnRT.js +78 -0
- package/package.json +1 -1
- package/dist/IngredientsView-BvKaI0nb.js +0 -1755
- package/dist/ReceiveRequestView-BGlxEJkh.js +0 -1626
- package/dist/StockView-BKX6NX-g.js +0 -1909
- package/dist/TransferTemplateView-ByYEje9E.js +0 -1237
- package/dist/defineDeepModel-DH8vhBpR.js +0 -13
- package/dist/format-time-from-id-CAjL4U2X.js +0 -15
- package/dist/purchase-order-transaction-type-BJDnbhdk.js +0 -338
- package/dist/supplier-wJJ7ATk2.js +0 -69
- package/dist/xlsx.util-BwF0vRjF.js +0 -109
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateType } from '@/api/type';
|
|
2
|
-
export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier", Pick<{
|
|
2
|
+
export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier", import("pinia")._UnwrapAll<Pick<{
|
|
3
3
|
readSuppliers(): Promise<void>;
|
|
4
4
|
createSupplier(supplier: CreateType<FdoSupplier>): Promise<void>;
|
|
5
5
|
updateSupplier(supplier: FdoSupplier): Promise<void>;
|
|
@@ -260,7 +260,46 @@ export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier
|
|
|
260
260
|
};
|
|
261
261
|
registrationNumber: string;
|
|
262
262
|
}[]>;
|
|
263
|
-
|
|
263
|
+
supplierById: import("vue").ComputedRef<{
|
|
264
|
+
[key: string]: {
|
|
265
|
+
phoneNumber?: string | null | undefined;
|
|
266
|
+
email?: string | null | undefined;
|
|
267
|
+
_rev?: string | null | undefined;
|
|
268
|
+
internal?: "restaurant" | "warehouse" | null | undefined;
|
|
269
|
+
contactName?: string | null | undefined;
|
|
270
|
+
supplyItems?: {
|
|
271
|
+
defaultCost: {
|
|
272
|
+
measurement?: {
|
|
273
|
+
id: string;
|
|
274
|
+
name: string;
|
|
275
|
+
abbrev: string;
|
|
276
|
+
conversion: {
|
|
277
|
+
amount: number;
|
|
278
|
+
precision: number;
|
|
279
|
+
};
|
|
280
|
+
} | null | undefined;
|
|
281
|
+
costPerUnit: {
|
|
282
|
+
currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
|
|
283
|
+
amount: number;
|
|
284
|
+
precision: number;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
skuId: string;
|
|
288
|
+
}[] | null | undefined;
|
|
289
|
+
_id: string;
|
|
290
|
+
name: string;
|
|
291
|
+
address: {
|
|
292
|
+
line2?: string | null | undefined;
|
|
293
|
+
line1: string;
|
|
294
|
+
state: string;
|
|
295
|
+
city: string;
|
|
296
|
+
postcode: string;
|
|
297
|
+
country: string;
|
|
298
|
+
};
|
|
299
|
+
registrationNumber: string;
|
|
300
|
+
};
|
|
301
|
+
}>;
|
|
302
|
+
}, "locationSuppliers" | "businessSuppliers">>, Pick<{
|
|
264
303
|
readSuppliers(): Promise<void>;
|
|
265
304
|
createSupplier(supplier: CreateType<FdoSupplier>): Promise<void>;
|
|
266
305
|
updateSupplier(supplier: FdoSupplier): Promise<void>;
|
|
@@ -521,7 +560,46 @@ export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier
|
|
|
521
560
|
};
|
|
522
561
|
registrationNumber: string;
|
|
523
562
|
}[]>;
|
|
524
|
-
|
|
563
|
+
supplierById: import("vue").ComputedRef<{
|
|
564
|
+
[key: string]: {
|
|
565
|
+
phoneNumber?: string | null | undefined;
|
|
566
|
+
email?: string | null | undefined;
|
|
567
|
+
_rev?: string | null | undefined;
|
|
568
|
+
internal?: "restaurant" | "warehouse" | null | undefined;
|
|
569
|
+
contactName?: string | null | undefined;
|
|
570
|
+
supplyItems?: {
|
|
571
|
+
defaultCost: {
|
|
572
|
+
measurement?: {
|
|
573
|
+
id: string;
|
|
574
|
+
name: string;
|
|
575
|
+
abbrev: string;
|
|
576
|
+
conversion: {
|
|
577
|
+
amount: number;
|
|
578
|
+
precision: number;
|
|
579
|
+
};
|
|
580
|
+
} | null | undefined;
|
|
581
|
+
costPerUnit: {
|
|
582
|
+
currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
|
|
583
|
+
amount: number;
|
|
584
|
+
precision: number;
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
skuId: string;
|
|
588
|
+
}[] | null | undefined;
|
|
589
|
+
_id: string;
|
|
590
|
+
name: string;
|
|
591
|
+
address: {
|
|
592
|
+
line2?: string | null | undefined;
|
|
593
|
+
line1: string;
|
|
594
|
+
state: string;
|
|
595
|
+
city: string;
|
|
596
|
+
postcode: string;
|
|
597
|
+
country: string;
|
|
598
|
+
};
|
|
599
|
+
registrationNumber: string;
|
|
600
|
+
};
|
|
601
|
+
}>;
|
|
602
|
+
}, "suppliers" | "supplierById">, Pick<{
|
|
525
603
|
readSuppliers(): Promise<void>;
|
|
526
604
|
createSupplier(supplier: CreateType<FdoSupplier>): Promise<void>;
|
|
527
605
|
updateSupplier(supplier: FdoSupplier): Promise<void>;
|
|
@@ -782,4 +860,43 @@ export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier
|
|
|
782
860
|
};
|
|
783
861
|
registrationNumber: string;
|
|
784
862
|
}[]>;
|
|
863
|
+
supplierById: import("vue").ComputedRef<{
|
|
864
|
+
[key: string]: {
|
|
865
|
+
phoneNumber?: string | null | undefined;
|
|
866
|
+
email?: string | null | undefined;
|
|
867
|
+
_rev?: string | null | undefined;
|
|
868
|
+
internal?: "restaurant" | "warehouse" | null | undefined;
|
|
869
|
+
contactName?: string | null | undefined;
|
|
870
|
+
supplyItems?: {
|
|
871
|
+
defaultCost: {
|
|
872
|
+
measurement?: {
|
|
873
|
+
id: string;
|
|
874
|
+
name: string;
|
|
875
|
+
abbrev: string;
|
|
876
|
+
conversion: {
|
|
877
|
+
amount: number;
|
|
878
|
+
precision: number;
|
|
879
|
+
};
|
|
880
|
+
} | null | undefined;
|
|
881
|
+
costPerUnit: {
|
|
882
|
+
currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
|
|
883
|
+
amount: number;
|
|
884
|
+
precision: number;
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
skuId: string;
|
|
888
|
+
}[] | null | undefined;
|
|
889
|
+
_id: string;
|
|
890
|
+
name: string;
|
|
891
|
+
address: {
|
|
892
|
+
line2?: string | null | undefined;
|
|
893
|
+
line1: string;
|
|
894
|
+
state: string;
|
|
895
|
+
city: string;
|
|
896
|
+
postcode: string;
|
|
897
|
+
country: string;
|
|
898
|
+
};
|
|
899
|
+
registrationNumber: string;
|
|
900
|
+
};
|
|
901
|
+
}>;
|
|
785
902
|
}, "readSuppliers" | "createSupplier" | "updateSupplier" | "deleteSupplier" | "init">>;
|
|
@@ -9,10 +9,13 @@ export declare function useWarehouseStore(): {
|
|
|
9
9
|
url?: string | null | undefined;
|
|
10
10
|
expiredAt?: string | null | undefined;
|
|
11
11
|
agentId?: string | null | undefined;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
restaurantTagGroups?: {
|
|
13
|
+
name: string;
|
|
14
|
+
id: string;
|
|
15
|
+
tags: {
|
|
16
|
+
name: string;
|
|
17
|
+
id: string;
|
|
18
|
+
}[];
|
|
16
19
|
}[] | null | undefined;
|
|
17
20
|
pf_agent?: {
|
|
18
21
|
clickupId?: string | null | undefined;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { n as y, i as u, h as m, Z as b, $ as v } from "./app-DZiCiBV7.js";
|
|
2
|
+
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
|
+
import { defineStore as w } from "pinia";
|
|
4
|
+
import { ref as l, computed as d } from "vue";
|
|
5
|
+
const p = y((t, a) => {
|
|
6
|
+
function n() {
|
|
7
|
+
var o;
|
|
8
|
+
const s = c(), e = u(), r = e.businessLevel, i = `business_${((o = s.currentBusiness.value) == null ? void 0 : o._id) ?? ""}`, S = e.currentLocation.dbName;
|
|
9
|
+
return r ? i : S;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
async readSuppliers() {
|
|
13
|
+
const s = n(), e = `${t.inventoryBackendUrl}/${s}/supplier`;
|
|
14
|
+
return await a.get(e);
|
|
15
|
+
},
|
|
16
|
+
async readLocationSuppliers() {
|
|
17
|
+
const e = u().currentLocation.dbName, r = `${t.inventoryBackendUrl}/${e}/supplier`;
|
|
18
|
+
return await a.get(r);
|
|
19
|
+
},
|
|
20
|
+
async readBusinessSuppliers() {
|
|
21
|
+
var i;
|
|
22
|
+
const e = `business_${((i = c().currentBusiness.value) == null ? void 0 : i._id) ?? ""}`, r = `${t.inventoryBackendUrl}/${e}/supplier`;
|
|
23
|
+
return await a.get(r);
|
|
24
|
+
},
|
|
25
|
+
async createSupplier(s) {
|
|
26
|
+
const e = n(), r = `${t.inventoryBackendUrl}/${e}/supplier`;
|
|
27
|
+
return await a.post(r, s);
|
|
28
|
+
},
|
|
29
|
+
async updateSupplier(s) {
|
|
30
|
+
const e = n(), r = `${t.inventoryBackendUrl}/${e}/supplier`;
|
|
31
|
+
return await a.put(r, s);
|
|
32
|
+
},
|
|
33
|
+
async deleteSupplier(s) {
|
|
34
|
+
const e = n(), r = `${t.inventoryBackendUrl}/${e}/supplier`;
|
|
35
|
+
return await a.delete(r, s);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}), f = w("supplier", () => {
|
|
39
|
+
const t = l(new Array()), a = l(new Array()), n = d(() => [...t.value, ...a.value]), s = d(() => m(n.value, "_id"));
|
|
40
|
+
return {
|
|
41
|
+
async readSuppliers() {
|
|
42
|
+
const e = p();
|
|
43
|
+
t.value = await e.readLocationSuppliers(), a.value = await e.readBusinessSuppliers();
|
|
44
|
+
},
|
|
45
|
+
async createSupplier(e) {
|
|
46
|
+
await p().createSupplier(e);
|
|
47
|
+
},
|
|
48
|
+
async updateSupplier(e) {
|
|
49
|
+
await p().updateSupplier(e);
|
|
50
|
+
},
|
|
51
|
+
async deleteSupplier(e) {
|
|
52
|
+
await p().deleteSupplier(e);
|
|
53
|
+
},
|
|
54
|
+
async init() {
|
|
55
|
+
const e = b();
|
|
56
|
+
try {
|
|
57
|
+
await this.readSuppliers();
|
|
58
|
+
} catch (r) {
|
|
59
|
+
throw r instanceof v || e.error("Error at reading suppliers"), r;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
suppliers: n,
|
|
63
|
+
locationSuppliers: t,
|
|
64
|
+
businessSuppliers: a,
|
|
65
|
+
supplierById: s
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
f as u
|
|
70
|
+
};
|