mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
refactor: rename entityContainerSchema to EntityContainer and update usage in receipt schema; change checkbox selector for consistency
This commit is contained in:
@@ -8,7 +8,7 @@ const EntityContainerSchema = z.object({
|
||||
selected: z.boolean(),
|
||||
});
|
||||
|
||||
export function entityContainerSchema<T>(data: z.ZodType<T>) {
|
||||
export function EntityContainer<T>(data: z.ZodType<T>) {
|
||||
return EntityContainerSchema.extend({
|
||||
data: data,
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from 'zod';
|
||||
import { BuyerSchema } from './buyer.schema';
|
||||
import { entityContainerSchema } from '@isa/common/result';
|
||||
import { EntityContainer } from '@isa/common/result';
|
||||
import { ReceiptItemSchema } from './receipt-item.schema';
|
||||
import { ReceiptTypeSchema } from './receipt-type.schema';
|
||||
|
||||
@@ -8,7 +8,7 @@ export const ReceiptSchema = z.object({
|
||||
id: z.number(),
|
||||
receiptType: ReceiptTypeSchema,
|
||||
buyer: BuyerSchema,
|
||||
items: entityContainerSchema(ReceiptItemSchema).array(),
|
||||
items: EntityContainer(ReceiptItemSchema).array(),
|
||||
});
|
||||
|
||||
export type Receipt = z.infer<typeof ReceiptSchema>;
|
||||
|
||||
@@ -16,7 +16,7 @@ export const CheckboxAppearance = {
|
||||
export type CheckboxAppearance = (typeof CheckboxAppearance)[keyof typeof CheckboxAppearance];
|
||||
|
||||
@Component({
|
||||
selector: 'ui-checkbox-bullet',
|
||||
selector: 'ui-checkbox',
|
||||
templateUrl: './checkbox.component.html',
|
||||
styleUrls: ['./checkbox.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
||||
Reference in New Issue
Block a user