mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-02 09:59:09 +00:00
FEAT: update CustomerSidebarSection and related DTOs to use object type for title; update protospack-v2 version; update from id to customerId
This commit is contained in:
@@ -70,7 +70,7 @@ export class CustomersService implements OnModuleInit {
|
||||
async getLinks(customerId: string): Promise<CustomerLinksConfig | null> {
|
||||
try {
|
||||
const result = await lastValueFrom(
|
||||
this.customerService.CustomerGetLinks({ id: customerId }),
|
||||
this.customerService.CustomerGetLinks({ customerId }),
|
||||
);
|
||||
return (result.links as CustomerLinksConfig) || null;
|
||||
} catch (err) {
|
||||
@@ -88,7 +88,7 @@ export class CustomersService implements OnModuleInit {
|
||||
try {
|
||||
return await firstValueFrom(
|
||||
this.customerService.CustomerSetLinks({
|
||||
id: customerId,
|
||||
customerId,
|
||||
links: links as CustomerSetLinksRequest['links'],
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -14,8 +14,8 @@ export class CustomerLinkItem {
|
||||
export class CustomerSidebarLinkItem {
|
||||
@ApiProperty()
|
||||
type: 'link';
|
||||
@ApiProperty()
|
||||
title: string;
|
||||
@ApiProperty({ type: Object })
|
||||
title: Record<string, string>;
|
||||
@ApiProperty()
|
||||
link: string;
|
||||
@ApiPropertyOptional()
|
||||
@@ -25,8 +25,8 @@ export class CustomerSidebarLinkItem {
|
||||
export class CustomerSidebarMenuItem {
|
||||
@ApiProperty()
|
||||
type: 'menu';
|
||||
@ApiProperty()
|
||||
title: string;
|
||||
@ApiProperty({ type: Object })
|
||||
title: Record<string, string>;
|
||||
@ApiPropertyOptional()
|
||||
icon?: string;
|
||||
@ApiProperty({ type: [CustomerSidebarLinkItem] })
|
||||
@@ -34,8 +34,8 @@ export class CustomerSidebarMenuItem {
|
||||
}
|
||||
|
||||
export class CustomerSidebarSection {
|
||||
@ApiProperty()
|
||||
title: string;
|
||||
@ApiProperty({ type: Object })
|
||||
title: Record<string, string>;
|
||||
@ApiProperty({
|
||||
type: 'array',
|
||||
items: {
|
||||
|
||||
Reference in New Issue
Block a user