Upgrade to Angular 16
Merge `angular-update-16` into `dev` branch
This commit is contained in:
+19
-13
@@ -1,29 +1,35 @@
|
||||
<div class="tab-container mat-typography">
|
||||
<div fxLayout="row" fxLayoutAlign="start">
|
||||
<div class="layout-row align-start">
|
||||
<div class="m-b-10">
|
||||
<h3>{{ datatableName }}</h3>
|
||||
</div>
|
||||
<div class="action-button m-b-7" fxLayoutGap="10px">
|
||||
<div class="action-button m-b-7 gap-10px">
|
||||
<span *mifosxHasPermission="'CREATE_' + datatableName">
|
||||
<button mat-raised-button color="primary" (click)="add()">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
<span *mifosxHasPermission="'DELETE_' + datatableName" [fxShow]="isSelected">
|
||||
<button class="delete-button" mat-raised-button color="warn" (click)="deleteSelected()">
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>{{ 'labels.buttons.Delete Selected' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
<span *mifosxHasPermission="'DELETE_' + datatableName" [fxShow]="datatableData.length > 0">
|
||||
<button class="delete-button" mat-raised-button color="warn" (click)="delete()">
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>{{ 'labels.buttons.Delete All' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
<ng-container *mifosxHasPermission="'DELETE_' + datatableName">
|
||||
<span *ngIf="isSelected">
|
||||
<button class="delete-button" mat-raised-button color="warn" (click)="deleteSelected()">
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
||||
{{ 'labels.buttons.Delete Selected' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
</ng-container>
|
||||
<ng-container *mifosxHasPermission="'DELETE_' + datatableName">
|
||||
<span *ngIf="datatableData.length > 0">
|
||||
<button class="delete-button" mat-raised-button color="warn" (click)="delete()">
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
||||
{{ 'labels.buttons.Delete All' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m-t-10">
|
||||
<table #dataTable mat-table [dataSource]="datatableData" class="mat-elevation-z1 m-b-25" [fxHide]="isLoading">
|
||||
<table #dataTable mat-table [dataSource]="datatableData" class="mat-elevation-z1 m-b-25">
|
||||
<ng-container *ngFor="let datatableColumn of datatableColumns; let i = index" [matColumnDef]="datatableColumn">
|
||||
<ng-container *ngIf="i === 0">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
import { DecimalPipe } from '@angular/common';
|
||||
import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { MatCheckboxChange as MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatTable } from '@angular/material/table';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
+5
-8
@@ -1,6 +1,6 @@
|
||||
<div class="tab-container mat-typography">
|
||||
<h3>{{ datatableName }}</h3>
|
||||
<div fxLayout="row" fxLayoutAlign="flex-end" class="m-b-20">
|
||||
<div class="layout-row align-end m-b-20">
|
||||
<button mat-raised-button color="primary" (click)="add()" *ngIf="!dataObject.data[0]">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
|
||||
</button>
|
||||
@@ -16,19 +16,16 @@
|
||||
|
||||
<div class="m-t-10" *ngIf="dataObject.data.length > 0">
|
||||
<div
|
||||
fxFlexFill
|
||||
class="flex-fill"
|
||||
*ngFor="let columnHeader of dataObject.columnHeaders; let i = index"
|
||||
[ngClass]="setAttributeClass(columnHeader.columnName)"
|
||||
>
|
||||
<div fxFlex="40%" class="mat-body-strong left">
|
||||
<div class="mat-body-strong left flex-40">
|
||||
{{ columnHeader.columnDisplayName }}
|
||||
{{ getInputName(columnHeader.columnName) }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
fxFlex="68%"
|
||||
[ngSwitch]="getColumnType(columnHeader.columnDisplayType, columnHeader.columnType)"
|
||||
class="right"
|
||||
>
|
||||
<div [ngSwitch]="getColumnType(columnHeader.columnDisplayType, columnHeader.columnType)" class="right flex-60">
|
||||
<span *ngSwitchCase="'DATE'">
|
||||
{{ dataObject.data[0].row[i] | dateFormat }}
|
||||
</span>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="tab-container mat-typography">
|
||||
<div fxLayout="row" fxLayoutAlign="start center">
|
||||
<h3 fxFlex="90%">{{ 'labels.heading.Documents' | translate }}</h3>
|
||||
<div class="layout-row align-start-center">
|
||||
<h3 class="flex-90">{{ 'labels.heading.Documents' | translate }}</h3>
|
||||
|
||||
<div fxFlex="10%" *mifosxHasPermission="'CREATE_DOCUMENT'">
|
||||
<div class="flex-10" *mifosxHasPermission="'CREATE_DOCUMENT'">
|
||||
<button mat-raised-button class="f-right" color="primary" (click)="uploadDocument()">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
|
||||
</button>
|
||||
|
||||
@@ -72,7 +72,8 @@ export class EntityDocumentsTabComponent implements OnInit {
|
||||
|
||||
uploadDocument() {
|
||||
const uploadDocumentDialogRef = this.dialog.open(UploadDocumentDialogComponent, {
|
||||
data: { documentIdentifier: false, entityType: '' }
|
||||
data: { documentIdentifier: false, entityType: '' },
|
||||
width: '33rem'
|
||||
});
|
||||
uploadDocumentDialogRef.afterClosed().subscribe((dialogResponse: any) => {
|
||||
if (dialogResponse) {
|
||||
|
||||
@@ -5,12 +5,10 @@
|
||||
<form
|
||||
#formRef="ngForm"
|
||||
[formGroup]="noteForm"
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="start baseline"
|
||||
fxLayoutGap="20px"
|
||||
class="layout-row align-start-baseline gap-20px"
|
||||
(ngSubmit)="addNote()"
|
||||
>
|
||||
<mat-form-field fxFlex="calc(85%-20px)">
|
||||
<mat-form-field class="flex-85-minus-20px">
|
||||
<textarea
|
||||
required
|
||||
formControlName="note"
|
||||
@@ -20,7 +18,7 @@
|
||||
cdkAutosizeMinRows="2"
|
||||
></textarea>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button fxFlex color="primary" [disabled]="!noteForm.valid">
|
||||
<button mat-raised-button class="flex-1" color="primary" [disabled]="!noteForm.valid">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
@@ -28,23 +26,25 @@
|
||||
|
||||
<mat-list>
|
||||
<mat-list-item *ngFor="let entityNote of entityNotes; let i = index">
|
||||
<fa-icon icon="sticky-note" matListIcon></fa-icon>
|
||||
<h3 matLine>{{ entityNote.note }}</h3>
|
||||
<p matLine>
|
||||
<span
|
||||
><b>{{ 'labels.inputs.Created By' | translate }}:</b> {{ entityNote.createdByUsername }}</span
|
||||
><br />
|
||||
<span
|
||||
><b>{{ 'labels.inputs.Date' | translate }}:</b> {{ entityNote.createdOn | dateFormat }}</span
|
||||
>
|
||||
</p>
|
||||
<div fxLayout="row" fxLayoutAlign="flex-start">
|
||||
<button mat-button color="primary" (click)="editNote(entityNote.id, entityNote.note, i)">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
</button>
|
||||
<button mat-button color="warn" (click)="deleteNote(entityNote.id, i)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
<div class="list-item-content">
|
||||
<div class="left-section">
|
||||
<fa-icon icon="sticky-note" matListIcon></fa-icon>
|
||||
<span>{{ entityNote.note }}</span>
|
||||
<span class="note-details">
|
||||
<b>{{ 'labels.inputs.Created By' | translate }}:</b> {{ entityNote.createdByUsername }}
|
||||
<b>{{ 'labels.inputs.Date' | translate }}:</b> {{ entityNote.createdOn | dateFormat }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-section">
|
||||
<div class="layout-row align-start">
|
||||
<button mat-button color="primary" (click)="editNote(entityNote.id, entityNote.note, i)">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
</button>
|
||||
<button mat-button color="warn" (click)="deleteNote(entityNote.id, i)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
@@ -2,3 +2,25 @@
|
||||
padding: 1%;
|
||||
margin: 1%;
|
||||
}
|
||||
|
||||
.list-item-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.note-details {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.left-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.right-section {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user