+15
@@ -0,0 +1,15 @@
|
||||
<h1 mat-dialog-title>Delete Client Signature</h1>
|
||||
|
||||
<div *ngIf="signatureId" mat-dialog-content>
|
||||
<p>Are you sure you want to delete this clients signature ?</p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!signatureId" mat-dialog-content>
|
||||
<p>Client Signature is not provided.</p>
|
||||
</div>
|
||||
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-dialog-close>Cancel</button>
|
||||
<button mat-raised-button *ngIf="signatureId" color="warn" [mat-dialog-close]="{ delete: true, id: signatureId }">Confirm</button>
|
||||
<button mat-raised-button *ngIf="!signatureId" color="primary" [mat-dialog-close]="{ upload: true }">Upload</button>
|
||||
</mat-dialog-actions>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DeleteSignatureDialogComponent } from './delete-signature-dialog.component';
|
||||
|
||||
describe('DeleteSignatureDialogComponent', () => {
|
||||
let component: DeleteSignatureDialogComponent;
|
||||
let fixture: ComponentFixture<DeleteSignatureDialogComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DeleteSignatureDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DeleteSignatureDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
|
||||
/**
|
||||
* Delete signature dialog component.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'mifosx-delete-signature-dialog',
|
||||
templateUrl: './delete-signature-dialog.component.html',
|
||||
styleUrls: ['./delete-signature-dialog.component.scss']
|
||||
})
|
||||
export class DeleteSignatureDialogComponent {
|
||||
|
||||
/** Id of client signature in documents */
|
||||
signatureId: any;
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
* @param {any} data Documents data
|
||||
*/
|
||||
constructor(public dialogRef: MatDialogRef<DeleteSignatureDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any[]) {
|
||||
const signature = this.data.find((document: any) => document.name === 'clientSignature') || {};
|
||||
this.signatureId = signature.id;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user