feat: update package copy and admin control room
This commit is contained in:
28
resources/js/admin/mobile/lib/controlRoom.ts
Normal file
28
resources/js/admin/mobile/lib/controlRoom.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
export type LiveShowApproveMode = 'approve-and-live' | 'approve-only' | 'not-eligible';
|
||||
|
||||
export function resolveStatusTone(status?: string | null): 'success' | 'warning' | 'muted' {
|
||||
if (status === 'approved') {
|
||||
return 'success';
|
||||
}
|
||||
if (status === 'pending') {
|
||||
return 'warning';
|
||||
}
|
||||
return 'muted';
|
||||
}
|
||||
|
||||
export function normalizeLiveStatus(status?: string | null): 'pending' | 'approved' | 'rejected' | 'none' {
|
||||
if (status === 'approved' || status === 'pending' || status === 'rejected') {
|
||||
return status;
|
||||
}
|
||||
return 'none';
|
||||
}
|
||||
|
||||
export function resolveLiveShowApproveMode(galleryStatus?: string | null): LiveShowApproveMode {
|
||||
if (galleryStatus === 'pending') {
|
||||
return 'approve-and-live';
|
||||
}
|
||||
if (galleryStatus === 'approved') {
|
||||
return 'approve-only';
|
||||
}
|
||||
return 'not-eligible';
|
||||
}
|
||||
Reference in New Issue
Block a user