1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

refactor: ♻️ Refactor generale

This commit is contained in:
Maicol Battistini
2023-06-26 10:15:46 +02:00
parent 28261ac889
commit 0c213c8aed
3 changed files with 8 additions and 15 deletions

View File

@@ -103,6 +103,7 @@ export default abstract class RecordsPage<
}
modelQuery() {
// @ts-ignore
let query = this.modelType.query<M>();
for (const [attribute, value] of this.filters) {
@@ -323,8 +324,9 @@ export default abstract class RecordsPage<
return this.recordDialogsStates.get(key)!;
}
protected cellValueModifier(value: unknown, attribute: string, record: M): Match<string, unknown> {
protected cellValueModifier(value: unknown, attribute: string, record: M): Match<string, unknown, string[], string> {
return match(attribute)
.returnType()
.with('createdAt', 'updatedAt', () => dayjs(value as Date).format('DD/MM/YYYY HH:mm'));
}
}