From e4e2817baecb24775181868b85705a48ce4cdc81 Mon Sep 17 00:00:00 2001 From: flange92 <91523547+flange92@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:10:43 +0100 Subject: [PATCH] - add export action button - create export component --- .../export-modal/export-modal.component.html | 21 +++++++++++ .../export-modal/export-modal.component.ts | 35 +++++++++++++++++++ .../tenant-option-management.component.html | 13 ++++++- .../tenant-option-management.component.ts | 9 +++++ .../tenant-option-management.module.ts | 2 ++ 5 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 tenant-option-management/export-modal/export-modal.component.html create mode 100644 tenant-option-management/export-modal/export-modal.component.ts diff --git a/tenant-option-management/export-modal/export-modal.component.html b/tenant-option-management/export-modal/export-modal.component.html new file mode 100644 index 0000000..4bcf33c --- /dev/null +++ b/tenant-option-management/export-modal/export-modal.component.html @@ -0,0 +1,21 @@ + + +

+ +
+ + +
\ No newline at end of file diff --git a/tenant-option-management/export-modal/export-modal.component.ts b/tenant-option-management/export-modal/export-modal.component.ts new file mode 100644 index 0000000..b665c4a --- /dev/null +++ b/tenant-option-management/export-modal/export-modal.component.ts @@ -0,0 +1,35 @@ +import { Component } from '@angular/core'; +import { ITenantOption } from '@c8y/client'; +import { AlertService } from '@c8y/ngx-components'; +import { BsModalRef } from 'ngx-bootstrap/modal'; +import { Subject } from 'rxjs'; +import { TenantOptionManagementService } from '../tenant-option-management.service'; +import { TenantOptionRow } from '../../tenant-option-management/tenant-option-management.component'; + +@Component({ + templateUrl: './export-modal.component.html', +}) +export class ExportModalComponent { + closeSubject: Subject<(ITenantOption & { encrypted: string }) | null> = new Subject(); + + rows: TenantOptionRow[]; + + isLoading = false; + + constructor( + private tenantOptionMgmt: TenantOptionManagementService, + private alert: AlertService, + private modal: BsModalRef + ) { } + + export() { + this.isLoading = true; + console.log(this.rows) + this.isLoading = false; + } + + close() { + this.closeSubject.next(null); + this.modal.hide(); + } +} diff --git a/tenant-option-management/tenant-option-management.component.html b/tenant-option-management/tenant-option-management.component.html index 26e84cf..ebff4ad 100644 --- a/tenant-option-management/tenant-option-management.component.html +++ b/tenant-option-management/tenant-option-management.component.html @@ -1,4 +1,15 @@ - {{ 'Tenant Option Management' | translate }} + {{ 'Tenant Option Management ' | translate }} + + + +