diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/chart-template.service.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/chart-template.service.ts index 2ffc12c..f6d261e 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/chart-template.service.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/chart-template.service.ts @@ -8,7 +8,7 @@ import { ChartTemplate } from './chart-config-manager.component'; } ) export class ChartTemplateService { - private chartTemplatesUrl = 'chart-templates'; + private chartTemplatesUrl = 'api/chart-templates'; constructor(private apiRequest: ApiRequestService) { } diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/component-property.service.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/component-property.service.ts index 5904618..72f67af 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/component-property.service.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/component-property.service.ts @@ -7,7 +7,7 @@ import { ComponentProperty } from './chart-config-manager.component'; providedIn: 'root' }) export class ComponentPropertyService { - private componentPropertiesUrl = 'component-properties'; + private componentPropertiesUrl = 'api/component-properties'; constructor(private apiRequest: ApiRequestService) { } diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/dynamic-field.service.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/dynamic-field.service.ts index ae6cbfe..d48bc06 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/dynamic-field.service.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/dynamic-field.service.ts @@ -7,7 +7,7 @@ import { DynamicField } from './chart-config-manager.component'; providedIn: 'root' }) export class DynamicFieldService { - private dynamicFieldsUrl = 'dynamic-fields'; + private dynamicFieldsUrl = 'api/dynamic-fields'; constructor(private apiRequest: ApiRequestService) { } diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/ui-component.service.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/ui-component.service.ts index 9e0ec09..86afa27 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/ui-component.service.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-config/ui-component.service.ts @@ -7,7 +7,7 @@ import { UiComponent } from './chart-config-manager.component'; providedIn: 'root' }) export class UiComponentService { - private uiComponentsUrl = 'ui-components'; + private uiComponentsUrl = 'api/ui-components'; constructor(private apiRequest: ApiRequestService) { } diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/chart-type-manager.component.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/chart-type-manager.component.ts index 889cd70..3640074 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/chart-type-manager.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/chart-type-manager.component.ts @@ -93,42 +93,6 @@ export class ChartTypeManagerComponent implements OnInit { return ''; } - deleteChartType(id: number): void { - if (!confirm('Are you sure you want to delete this chart type?')) { - return; - } - - this.chartTypeLoadingState = ClrLoadingState.LOADING; - this.chartTypeService.deleteChartType(id).subscribe({ - next: () => { - this.chartTypes = this.chartTypes.filter(ct => ct.id !== id); - this.showSuccess('Chart type deleted successfully'); - this.chartTypeLoadingState = ClrLoadingState.SUCCESS; - }, - error: (error) => { - console.error('Error deleting chart type:', error); - this.showError('Error deleting chart type: ' + (error.error?.message || error.message || 'Unknown error')); - this.chartTypeLoadingState = ClrLoadingState.ERROR; - } - }); - } -} - // Handle ISO string within object - if (date.date) { - return date.date; - } - - // Handle other object formats - try { - return new Date(date).toISOString(); - } catch { - return ''; - } - } - - return ''; - } - deleteChartType(id: number): void { if (!confirm('Are you sure you want to delete this chart type?')) { return; diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/edit-chart-type.component.html b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/edit-chart-type.component.html index 3ec1527..1d854ee 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/edit-chart-type.component.html +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/chart-type-manager/edit-chart-type.component.html @@ -137,11 +137,11 @@