summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/stores
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-13 16:11:09 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-13 16:11:09 +0700
commitc873a401f0ea13e1881278e7977d4013d3a87394 (patch)
tree5474f90a5e2530f3d3fae38a0a9876fd20bd2c00 /src-migrate/modules/product-detail/stores
parentb9e64c111f21ac32466fa2a0f095df83ff111252 (diff)
parent66e990de0a552cbc63e2db0e9e93c84520a806f2 (diff)
Merge branch 'new-release' into Feature/pengajuan-tempo
Diffstat (limited to 'src-migrate/modules/product-detail/stores')
-rw-r--r--src-migrate/modules/product-detail/stores/useProductDetail.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src-migrate/modules/product-detail/stores/useProductDetail.ts b/src-migrate/modules/product-detail/stores/useProductDetail.ts
index eb409930..dee6b342 100644
--- a/src-migrate/modules/product-detail/stores/useProductDetail.ts
+++ b/src-migrate/modules/product-detail/stores/useProductDetail.ts
@@ -7,6 +7,8 @@ type State = {
quantityInput: string;
askAdminUrl: string;
isApproval : boolean;
+ selectedVariant : any;
+ sla : any;
};
type Action = {
@@ -14,6 +16,8 @@ type Action = {
setQuantityInput: (value: string) => void;
setAskAdminUrl: (url: string) => void;
setIsApproval : (value : boolean) => void;
+ setSelectedVariant : (value : any) => void;
+ setSla : (value : any) => void;
};
export const useProductDetail = create<State & Action>((set, get) => ({
@@ -22,6 +26,8 @@ export const useProductDetail = create<State & Action>((set, get) => ({
quantityInput: '1',
askAdminUrl: '',
isApproval : false,
+ selectedVariant: null,
+ sla : null,
setActive: (variant) => {
set({ activeVariantId: variant?.id, activePrice: variant?.price });
},
@@ -33,5 +39,11 @@ export const useProductDetail = create<State & Action>((set, get) => ({
},
setIsApproval : (value : boolean) => {
set({ isApproval : value })
+ },
+ setSelectedVariant : (value : any) => {
+ set({ selectedVariant : value })
+ },
+ setSla : (value : any ) => {
+ set({ sla : value })
}
}));