@lmnto/h-mall-shared 1.0.17 → 1.0.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmnto/h-mall-shared",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "scripts": {
@@ -151,6 +151,14 @@ export default function CartDrawerComponent({
151
151
  {scopeT("category")}:{" "}
152
152
  {replaceForbiddenKeyword(cartProduct.product.category.name)}
153
153
  </Typography>
154
+ {cartProduct.isAutoAdded && (
155
+ <Typography
156
+ variant="small"
157
+ className="text-xs font-medium text-orange-500"
158
+ >
159
+ Required for purchase
160
+ </Typography>
161
+ )}
154
162
 
155
163
  {cartProduct?.maximumUserCanPurchase &&
156
164
  cartProduct.userPurchaseLimit != null &&
@@ -19,6 +19,12 @@ export const CROWN_IMAGE = "/img/crown.svg";
19
19
  export const CATEGORY_FOR_SMART_PAY = "smart-pay";
20
20
  export const CATEGORY_FOR_AI_COMPUTING = "ai-computing";
21
21
  export const CATEGORY_FOR_LICENSE = "license";
22
+ export const CATEGORY_FOR_SUBSCRIPTION = "subscription";
23
+
24
+ export const MEMBERSHIP_REQUIRED_CATEGORIES = [
25
+ "machine",
26
+ "ai-computing",
27
+ ] as const;
22
28
 
23
29
  export const CART_STATUS = {
24
30
  checkout: "checkout",
@@ -118,6 +118,7 @@ export type cartProduct = {
118
118
  category: cartProductCategory;
119
119
  price: number;
120
120
  canProductBeRemoved: boolean;
121
+ isAutoAdded?: boolean;
121
122
  canUserPurchaseTheProduct: boolean;
122
123
  feedBackMessage: string;
123
124
  maximumUserCanPurchase: number | null;
@@ -144,6 +145,7 @@ export type CartTableItemComponentProps = {
144
145
  feedBackMessage: string;
145
146
  canUserPurchaseTheProduct: boolean;
146
147
  canProductBeRemoved: boolean;
148
+ isAutoAdded?: boolean;
147
149
  unitOriginalPrice: number;
148
150
  unitDiscount: number;
149
151
  unitPrice: number;