Spaces:
Sleeping
Sleeping
Download utils/subscriptionPackages.js from Mahmoud7456/MultiUsersSalesSystem: direct link, hf CLI and curl.
- Browser
- Download file 933 Bytes
-
https://huggingface.co/spaces/Mahmoud7456/MultiUsersSalesSystem/resolve/main/utils/subscriptionPackages.js
- Command line
-
hf download hf://spaces/Mahmoud7456/MultiUsersSalesSystem/utils/subscriptionPackages.js
-
curl -L -o subscriptionPackages.js https://huggingface.co/spaces/Mahmoud7456/MultiUsersSalesSystem/resolve/main/utils/subscriptionPackages.js
933 Bytes
| export const SUBSCRIPTION_PACKAGES = { | |
| basic: { | |
| key: "basic", | |
| label: "Basic", | |
| cashierLimit: 1, | |
| branchLimit: 1, | |
| }, | |
| standard: { | |
| key: "standard", | |
| label: "Standard", | |
| cashierLimit: 2, | |
| branchLimit: 2, | |
| }, | |
| premium: { | |
| key: "premium", | |
| label: "Premium", | |
| cashierLimit: null, | |
| branchLimit: null, | |
| }, | |
| }; | |
| export const DEFAULT_SUBSCRIPTION_PACKAGE = "basic"; | |
| export const normalizePackageKey = (value) => { | |
| const key = String(value || "").trim().toLowerCase(); | |
| return SUBSCRIPTION_PACKAGES[key] ? key : null; | |
| }; | |
| export const getPackageDetails = (value) => { | |
| const key = normalizePackageKey(value) || DEFAULT_SUBSCRIPTION_PACKAGE; | |
| return SUBSCRIPTION_PACKAGES[key]; | |
| }; | |
| export const isUnlimitedCashierLimit = (limit) => limit === null; | |
| export const isUnlimitedBranchLimit = (limit) => limit === null; | |