feat(POS-006): completed feature
This commit is contained in:
15
project/apps/pos/src/lib/permissions.ts
Normal file
15
project/apps/pos/src/lib/permissions.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/** POS permissions used in the POS app. */
|
||||
export type PosPermission =
|
||||
| 'POS_SELL'
|
||||
| 'POS_REFUND'
|
||||
| 'POS_DISCOUNT'
|
||||
| 'POS_VOID'
|
||||
| 'POS_OPEN_REGISTER'
|
||||
| 'POS_CLOSE_REGISTER';
|
||||
|
||||
/** Map role → granted permissions. */
|
||||
export const POS_ROLE_PERMISSIONS: Record<string, PosPermission[]> = {
|
||||
admin: ['POS_SELL', 'POS_REFUND', 'POS_DISCOUNT', 'POS_VOID', 'POS_OPEN_REGISTER', 'POS_CLOSE_REGISTER'],
|
||||
pos_manager: ['POS_SELL', 'POS_REFUND', 'POS_DISCOUNT', 'POS_VOID', 'POS_OPEN_REGISTER', 'POS_CLOSE_REGISTER'],
|
||||
pos_cashier: ['POS_SELL'],
|
||||
};
|
||||
Reference in New Issue
Block a user