refactor user accounts structure
This commit is contained in:
@@ -22,23 +22,6 @@ export const PaymentMethodType = {
|
||||
export type PaymentMethodType = (typeof PaymentMethodType)[keyof typeof PaymentMethodType]
|
||||
|
||||
|
||||
export const PurchaseReceiptStatus = {
|
||||
UNPAID: 'UNPAID',
|
||||
PARTIALLY_PAID: 'PARTIALLY_PAID',
|
||||
PAID: 'PAID'
|
||||
} as const
|
||||
|
||||
export type PurchaseReceiptStatus = (typeof PurchaseReceiptStatus)[keyof typeof PurchaseReceiptStatus]
|
||||
|
||||
|
||||
export const SalesInvoiceType = {
|
||||
GOOD: 'GOOD',
|
||||
SERVICE: 'SERVICE'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceType = (typeof SalesInvoiceType)[keyof typeof SalesInvoiceType]
|
||||
|
||||
|
||||
export const UnitType = {
|
||||
COUNT: 'COUNT',
|
||||
GRAM: 'GRAM',
|
||||
@@ -69,31 +52,6 @@ export const CustomerType = {
|
||||
export type CustomerType = (typeof CustomerType)[keyof typeof CustomerType]
|
||||
|
||||
|
||||
export const UserStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
INACTIVE: 'INACTIVE'
|
||||
} as const
|
||||
|
||||
export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]
|
||||
|
||||
|
||||
export const AccountRole = {
|
||||
OWNER: 'OWNER',
|
||||
OPERATOR: 'OPERATOR',
|
||||
ACCOUNTANT: 'ACCOUNTANT'
|
||||
} as const
|
||||
|
||||
export type AccountRole = (typeof AccountRole)[keyof typeof AccountRole]
|
||||
|
||||
|
||||
export const AccountStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type AccountStatus = (typeof AccountStatus)[keyof typeof AccountStatus]
|
||||
|
||||
|
||||
export const POSStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
DISABLED: 'DISABLED'
|
||||
@@ -104,13 +62,28 @@ export type POSStatus = (typeof POSStatus)[keyof typeof POSStatus]
|
||||
|
||||
export const POSRole = {
|
||||
MANAGER: 'MANAGER',
|
||||
OPERATOR: 'OPERATOR',
|
||||
VIEWER: 'VIEWER'
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type POSRole = (typeof POSRole)[keyof typeof POSRole]
|
||||
|
||||
|
||||
export const ComplexRole = {
|
||||
MANAGER: 'MANAGER',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type ComplexRole = (typeof ComplexRole)[keyof typeof ComplexRole]
|
||||
|
||||
|
||||
export const BusinessRole = {
|
||||
MANAGER: 'MANAGER',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type BusinessRole = (typeof BusinessRole)[keyof typeof BusinessRole]
|
||||
|
||||
|
||||
export const LicenseType = {
|
||||
BASIC: 'BASIC',
|
||||
PRO: 'PRO',
|
||||
@@ -148,41 +121,91 @@ export type UserType = (typeof UserType)[keyof typeof UserType]
|
||||
|
||||
|
||||
export const AccountType = {
|
||||
PARTNER: 'PARTNER',
|
||||
BUSINESS: 'BUSINESS',
|
||||
SUPER_ADMIN: 'SUPER_ADMIN',
|
||||
ADMIN: 'ADMIN',
|
||||
PROVIDER: 'PROVIDER',
|
||||
POS: 'POS'
|
||||
PARTNER: 'PARTNER',
|
||||
CONSUMER: 'CONSUMER'
|
||||
} as const
|
||||
|
||||
export type AccountType = (typeof AccountType)[keyof typeof AccountType]
|
||||
|
||||
|
||||
export const UserStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
INACTIVE: 'INACTIVE'
|
||||
} as const
|
||||
|
||||
export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]
|
||||
|
||||
|
||||
export const AccountRole = {
|
||||
OWNER: 'OWNER',
|
||||
OPERATOR: 'OPERATOR',
|
||||
ACCOUNTANT: 'ACCOUNTANT'
|
||||
} as const
|
||||
|
||||
export type AccountRole = (typeof AccountRole)[keyof typeof AccountRole]
|
||||
|
||||
|
||||
export const AccountStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type AccountStatus = (typeof AccountStatus)[keyof typeof AccountStatus]
|
||||
|
||||
|
||||
export const PartnerRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OWNER: 'OWNER',
|
||||
MANAGER: 'MANAGER',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type PartnerRole = (typeof PartnerRole)[keyof typeof PartnerRole]
|
||||
|
||||
|
||||
export const BusinessRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR'
|
||||
export const PartnerStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type BusinessRole = (typeof BusinessRole)[keyof typeof BusinessRole]
|
||||
export type PartnerStatus = (typeof PartnerStatus)[keyof typeof PartnerStatus]
|
||||
|
||||
|
||||
export const ProviderRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OWNER: 'OWNER',
|
||||
MANAGER: 'MANAGER',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type ProviderRole = (typeof ProviderRole)[keyof typeof ProviderRole]
|
||||
|
||||
|
||||
export const ProviderStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type ProviderStatus = (typeof ProviderStatus)[keyof typeof ProviderStatus]
|
||||
|
||||
|
||||
export const ConsumerRole = {
|
||||
OWNER: 'OWNER',
|
||||
MANAGER: 'MANAGER',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type ConsumerRole = (typeof ConsumerRole)[keyof typeof ConsumerRole]
|
||||
|
||||
|
||||
export const ConsumerStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type ConsumerStatus = (typeof ConsumerStatus)[keyof typeof ConsumerStatus]
|
||||
|
||||
|
||||
export const TokenType = {
|
||||
ACCESS: 'ACCESS',
|
||||
REFRESH: 'REFRESH'
|
||||
|
||||
Reference in New Issue
Block a user