initial
This commit is contained in:
23
apps/client/helpers/invoices.ts
Normal file
23
apps/client/helpers/invoices.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { AlertType } from 'ui-layer/components/alert/types'
|
||||
import type { UiIcon } from '#build/types/ui/icons'
|
||||
|
||||
export function getStatusType(status: string): AlertType {
|
||||
switch (status) {
|
||||
case 'completed':
|
||||
return 'positive'
|
||||
case 'expired':
|
||||
return 'negative'
|
||||
default:
|
||||
return 'warning'
|
||||
}
|
||||
}
|
||||
export function getStatusIcon(status: string): UiIcon {
|
||||
switch (status) {
|
||||
case 'completed':
|
||||
return 's-check'
|
||||
case 'expired':
|
||||
return 's-cross'
|
||||
default:
|
||||
return 's-clock'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user