refactor, added slate, added editor, added book
This commit is contained in:
parent
bc250e73bb
commit
029b7e9353
33 changed files with 714 additions and 496 deletions
|
|
@ -1,9 +1,16 @@
|
|||
import { WorkingProgressStatus } from '@generated/types';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export function assertUnreachable(value: never): never {
|
||||
throw new Error(`Unhandled scenario: ${value}`);
|
||||
}
|
||||
|
||||
export function toFormattedDate({ value }: { value: string }): string {
|
||||
const date = new Date(value);
|
||||
const day = dayjs(date).format('DD.MM.YYYY');
|
||||
return day;
|
||||
}
|
||||
|
||||
export function toBgColorByProgressStatus(value: WorkingProgressStatus): string {
|
||||
if (value === WorkingProgressStatus.InProgress) return 'yellow.500';
|
||||
if (value === WorkingProgressStatus.Frozen) return 'blue.500';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue