Merge branch 'master' into glim
This commit is contained in:
+51
-51
@@ -14,15 +14,6 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Staff</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Legal Form</mat-label>
|
||||
<mat-select formControlName="legalFormId">
|
||||
@@ -32,8 +23,17 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Staff</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.contains('fullname')" fxFlex="48%">
|
||||
<mat-label>Name</mat-label>
|
||||
<mat-label>{{ createClientForm.value.legalFormId === 1 ? 'Name' : 'Entity Name' }}</mat-label>
|
||||
<input matInput required formControlName="fullname">
|
||||
<mat-error *ngIf="createClientForm.controls.fullname.hasError('required')">
|
||||
Client name is <strong>required</strong>
|
||||
@@ -85,6 +85,46 @@
|
||||
<input matInput formControlName="externalId">
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
|
||||
*ngIf="createClientForm.contains('clientNonPersonDetails')">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Constitution</mat-label>
|
||||
<mat-select formControlName="constitutionId" required>
|
||||
<mat-option *ngFor="let constitution of constitutionOptions" [value]="constitution.id">
|
||||
{{ constitution.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Main Business Line</mat-label>
|
||||
<mat-select formControlName="mainBusinessLineId">
|
||||
<mat-option *ngFor="let business of businessLineOptions" [value]="business.id">
|
||||
{{ business.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="incorpValidityTillDateDatePicker.open()">
|
||||
<mat-label>Incorporation Validity Till Date</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="incorpValidityTillDateDatePicker" formControlName="incorpValidityTillDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Incorporation Number</mat-label>
|
||||
<input matInput formControlName="incorpNumber">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="98%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput formControlName="remarks"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.value.legalFormId === 1" fxFlex="48%">
|
||||
<mat-label>Gender</mat-label>
|
||||
<mat-select formControlName="genderId">
|
||||
@@ -131,7 +171,7 @@
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="submittedOnDatePicker.open()">
|
||||
<mat-label>Submitted On</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="submittedOnDatePicker" formControlName="submittedOnDate">
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="submittedOnDatePicker" formControlName="submittedOnDate" required>
|
||||
<mat-datepicker-toggle matSuffix [for]="submittedOnDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #submittedOnDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
@@ -169,46 +209,6 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
|
||||
*ngIf="createClientForm.contains('clientNonPersonDetails')">
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="incorpValidityTillDateDatePicker.open()">
|
||||
<mat-label>Incorporation Validity Till Date</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="incorpValidityTillDateDatePicker" formControlName="incorpValidityTillDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Incorporation Number</mat-label>
|
||||
<input matInput formControlName="incorpNumber">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Main Business Line</mat-label>
|
||||
<mat-select formControlName="mainBusinessLineId">
|
||||
<mat-option *ngFor="let business of businessLineOptions" [value]="business.id">
|
||||
{{ business.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Constitution</mat-label>
|
||||
<mat-select formControlName="constitutionId">
|
||||
<mat-option *ngFor="let constitution of constitutionOptions" [value]="constitution.id">
|
||||
{{ constitution.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="98%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput formControlName="remarks"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
|
||||
@@ -117,7 +117,7 @@ export class ClientGeneralStepComponent implements OnInit {
|
||||
this.createClientForm.removeControl('lastname');
|
||||
this.createClientForm.addControl('fullname', new FormControl('', [Validators.required, Validators.pattern('(^[A-z]).*')]));
|
||||
this.createClientForm.addControl('clientNonPersonDetails', this.formBuilder.group({
|
||||
'constitutionId': [''],
|
||||
'constitutionId': ['', Validators.required],
|
||||
'incorpValidityTillDate': [''],
|
||||
'incorpNumber': [''],
|
||||
'mainBusinessLineId': [''],
|
||||
|
||||
-3
@@ -68,7 +68,6 @@ export class AcceptClientTransferComponent implements OnInit {
|
||||
*/
|
||||
submit() {
|
||||
const acceptClientTransferFormData = this.acceptClientTransferForm.value;
|
||||
const locale = this.settingsService.language.code;
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const prevTransferDate: Date = this.acceptClientTransferForm.value.transferDate;
|
||||
if (acceptClientTransferFormData.transferDate instanceof Date) {
|
||||
@@ -76,8 +75,6 @@ export class AcceptClientTransferComponent implements OnInit {
|
||||
}
|
||||
const data = {
|
||||
...acceptClientTransferFormData,
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.clientsService.executeClientCommand(this.clientId, 'acceptTransfer', data).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../']">Cancel</button>
|
||||
<button mat-raised-button color="accent" [disabled]="!reactivateClientForm.valid">Confirm</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!reactivateClientForm.valid">Confirm</button>
|
||||
</mat-card-actions>
|
||||
|
||||
</form>
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ export class ReactivateClientComponent implements OnInit {
|
||||
const locale = this.settingsService.language.code;
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const prevReactivationDate: Date = this.reactivateClientForm.value.reactivationDate;
|
||||
if (reactivateClientFormData.closureDate instanceof Date) {
|
||||
if (reactivateClientFormData.reactivationDate instanceof Date) {
|
||||
reactivateClientFormData.reactivationDate = this.dateUtils.formatDate(prevReactivationDate, dateFormat);
|
||||
}
|
||||
const data = {
|
||||
|
||||
@@ -20,15 +20,6 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Staff</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Legal Form</mat-label>
|
||||
<mat-select formControlName="legalFormId">
|
||||
@@ -38,8 +29,22 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Account No</mat-label>
|
||||
<input matInput formControlName="accountNo">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Staff</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="editClientForm.contains('fullname')" fxFlex="48%">
|
||||
<mat-label>Name</mat-label>
|
||||
<mat-label>{{ editClientForm.value.legalFormId === 1 ? 'Name' : 'Entity Name' }}</mat-label>
|
||||
<input matInput required formControlName="fullname">
|
||||
<mat-error *ngIf="editClientForm.controls.fullname.hasError('required')">
|
||||
Client name is <strong>required</strong>
|
||||
@@ -74,10 +79,44 @@
|
||||
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Account No</mat-label>
|
||||
<input matInput formControlName="accountNo">
|
||||
</mat-form-field>
|
||||
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
|
||||
*ngIf="editClientForm.contains('clientNonPersonDetails')">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Constitution</mat-label>
|
||||
<mat-select formControlName="constitutionId" required>
|
||||
<mat-option *ngFor="let constitution of constitutionOptions" [value]="constitution.id">
|
||||
{{ constitution.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Main Business Line</mat-label>
|
||||
<mat-select formControlName="mainBusinessLineId">
|
||||
<mat-option *ngFor="let business of businessLineOptions" [value]="business.id">
|
||||
{{ business.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="incorpValidityTillDateDatePicker.open()">
|
||||
<mat-label>Incorporation Validity Till Date</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="incorpValidityTillDateDatePicker" formControlName="incorpValidityTillDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Incorporation No</mat-label>
|
||||
<input matInput formControlName="incorpNumber">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="98%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput formControlName="remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>External Id</mat-label>
|
||||
@@ -131,7 +170,7 @@
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="activatedOnDatePicker.open()">
|
||||
<mat-label>Activated On</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="activatedOnDatePicker"
|
||||
<input matInput [min]="editClientForm.value.submittedOnDate" [max]="maxDate" [matDatepicker]="activatedOnDatePicker"
|
||||
formControlName="activationDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="activatedOnDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #activatedOnDatePicker></mat-datepicker>
|
||||
@@ -146,46 +185,6 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
|
||||
*ngIf="editClientForm.contains('clientNonPersonDetails')">
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="incorpValidityTillDateDatePicker.open()">
|
||||
<mat-label>Incorporation Validity Till Date</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="incorpValidityTillDateDatePicker" formControlName="incorpValidityTillDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Incorporation No</mat-label>
|
||||
<input matInput formControlName="incorpNumber">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Main Business Line</mat-label>
|
||||
<mat-select formControlName="mainBusinessLineId">
|
||||
<mat-option *ngFor="let business of businessLineOptions" [value]="business.id">
|
||||
{{ business.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Constitution</mat-label>
|
||||
<mat-select formControlName="constitutionId">
|
||||
<mat-option *ngFor="let constitution of constitutionOptions" [value]="constitution.id">
|
||||
{{ constitution.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="98%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput formControlName="remarks"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
@@ -96,7 +96,7 @@ export class EditClientComponent implements OnInit {
|
||||
this.editClientForm = this.formBuilder.group({
|
||||
'officeId': [{ value: '', disabled: true }],
|
||||
'staffId': [''],
|
||||
'legalFormId': [''],
|
||||
'legalFormId': [{ value: '', disabled: true }],
|
||||
'isStaff': [false],
|
||||
'active': [false],
|
||||
'accountNo': [{ value: '', disabled: true }],
|
||||
@@ -143,7 +143,7 @@ export class EditClientComponent implements OnInit {
|
||||
this.editClientForm.removeControl('lastname');
|
||||
this.editClientForm.addControl('fullname', new FormControl(this.clientDataAndTemplate.fullname, Validators.required));
|
||||
this.editClientForm.addControl('clientNonPersonDetails', this.formBuilder.group({
|
||||
'constitutionId': [this.clientDataAndTemplate.clientNonPersonDetails.constitution && this.clientDataAndTemplate.clientNonPersonDetails.constitution.id],
|
||||
'constitutionId': [this.clientDataAndTemplate.clientNonPersonDetails.constitution && this.clientDataAndTemplate.clientNonPersonDetails.constitution.id, Validators.required],
|
||||
'incorpValidityTillDate': [this.clientDataAndTemplate.clientNonPersonDetails.incorpValidityTillDate && new Date(this.clientDataAndTemplate.clientNonPersonDetails.incorpValidityTillDate)],
|
||||
'incorpNumber': [this.clientDataAndTemplate.clientNonPersonDetails.incorpNumber],
|
||||
'mainBusinessLineId': [this.clientDataAndTemplate.clientNonPersonDetails.mainBusinessLine && this.clientDataAndTemplate.clientNonPersonDetails.mainBusinessLine.id],
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
<button mat-raised-button color="primary" [routerLink]="'edit'" *ngIf="allowEdition">
|
||||
<fa-icon icon="edit"></fa-icon> Edit
|
||||
</button>
|
||||
|
||||
<button mat-raised-button color="warn" *ngIf="allowEdition" (click)="undoTransaction()">
|
||||
|
||||
<button mat-raised-button color="warn" (click)="undoTransaction()" *ngIf="allowUndo">
|
||||
<fa-icon icon="undo"></fa-icon> Undo
|
||||
</button>
|
||||
</span>
|
||||
|
||||
@@ -26,6 +26,8 @@ export class ViewTransactionComponent {
|
||||
transactionData: any;
|
||||
/** Is Editable */
|
||||
allowEdition = true;
|
||||
/** Is Undoable */
|
||||
allowUndo = true;
|
||||
|
||||
/**
|
||||
* Retrieves the Transaction data from `resolve`.
|
||||
@@ -46,6 +48,7 @@ export class ViewTransactionComponent {
|
||||
this.transactionData = data.loansAccountTransaction;
|
||||
this.allowEdition = !this.transactionData.manuallyReversed && !(this.transactionData.type.id === 20 || this.transactionData.type.id === 21 || this.transactionData.type.id === 22
|
||||
|| this.transactionData.type.id === 23);
|
||||
this.allowUndo = !this.transactionData.manuallyReversed;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,7 @@
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="toDatePicker.open()">
|
||||
<mat-label>To</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="toDatePicker" required formControlName="endDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
|
||||
<input matInput [min]="createCashierForm.value.startDate" [max]="maxDate" [matDatepicker]="toDatePicker" required formControlName="endDate"> <mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #toDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="createCashierForm.controls.endDate.hasError('required')">
|
||||
To Date <strong>is required</strong>
|
||||
|
||||
@@ -48,7 +48,7 @@ export class CreateCashierComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.maxDate = this.settingsService.maxFutureDate;
|
||||
this.setCreateCashierForm();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,7 @@
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="toDatePicker.open()">
|
||||
<mat-label>To</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="toDatePicker" required formControlName="endDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
|
||||
<input matInput [min]="editCashierForm.value.startDate" [max]="maxDate" [matDatepicker]="toDatePicker" required formControlName="endDate"> <mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #toDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="editCashierForm.controls.endDate.hasError('required')">
|
||||
To Date <strong>is required</strong>
|
||||
|
||||
@@ -52,7 +52,7 @@ export class EditCashierComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.maxDate = this.settingsService.maxFutureDate;
|
||||
this.setEditChargeForm();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export class SettleCashComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.maxDate = this.settingsService.maxFutureDate;
|
||||
this.setCashierForm();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<mat-error *ngIf="tellerForm.controls.name.hasError('pattern')">
|
||||
Teller Name <strong>cannot</strong> begin with a special character or number
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Office</mat-label>
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<mat-form-field (click)="endDatePicker.open()">
|
||||
<mat-label>End Date</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="endDatePicker" formControlName="endDate">
|
||||
<input matInput [min]="tellerForm.value.startDate" [max]="maxDate" [matDatepicker]="endDatePicker" formControlName="endDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #endDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -55,7 +55,7 @@ export class CreateTellerComponent implements OnInit {
|
||||
* Creates the teller form.
|
||||
*/
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.maxDate = this.settingsService.maxFutureDate;
|
||||
this.createTellerForm();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<mat-error *ngIf="tellerForm.controls.name.hasError('pattern')">
|
||||
Teller Name <strong>cannot</strong> begin with a special character or number
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Office</mat-label>
|
||||
@@ -26,8 +26,8 @@
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Description</mat-label>
|
||||
<input matInput formControlName="description">
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
<mat-form-field (click)="startDatePicker.open()">
|
||||
<mat-label>Start Date</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="startDatePicker" required formControlName="startDate">
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="startDatePicker" required
|
||||
formControlName="startDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #startDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="tellerForm.controls.startDate.hasError('required')">
|
||||
@@ -45,7 +46,7 @@
|
||||
|
||||
<mat-form-field (click)="endDatePicker.open()">
|
||||
<mat-label>End Date</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="endDatePicker" formControlName="endDate">
|
||||
<input matInput [min]="tellerForm.value.startDate" [max]="maxDate" [matDatepicker]="endDatePicker" formControlName="endDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #endDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
@@ -68,7 +69,8 @@
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!tellerForm.valid" *mifosxHasPermission="'UPDATE_TELLER'">Submit</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!tellerForm.valid"
|
||||
*mifosxHasPermission="'UPDATE_TELLER'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -67,7 +67,7 @@ export class EditTellerComponent implements OnInit {
|
||||
* Creates the Edit teller form.
|
||||
*/
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.maxDate = this.settingsService.maxFutureDate;
|
||||
this.createEditTellerForm();
|
||||
}
|
||||
|
||||
|
||||
+14
-14
@@ -3,7 +3,8 @@
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Charge</mat-label>
|
||||
<mat-select #charge>
|
||||
<mat-option *ngFor="let charge of chargeData | chargesFilter:chargesDataSource:currencyCode.value" [value]="charge">
|
||||
<mat-option *ngFor="let charge of chargeData | chargesFilter:chargesDataSource:currencyCode.value"
|
||||
[value]="charge">
|
||||
{{ charge.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
@@ -16,7 +17,8 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table fxFlex="98%" class="mat-elevation-z1" mat-table [dataSource]="chargesDataSource" [hidden]="chargesDataSource.length === 0">
|
||||
<table fxFlex="98%" class="mat-elevation-z1" mat-table [dataSource]="chargesDataSource"
|
||||
*ngIf="chargesDataSource.length > 0">
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> Name </th>
|
||||
@@ -35,7 +37,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> Amount </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount }}
|
||||
{{ charge.amount }}
|
||||
<button mat-icon-button color="primary" (click)="editChargeAmount(charge)">
|
||||
<fa-icon icon="pen"></fa-icon>
|
||||
</button>
|
||||
@@ -52,21 +54,19 @@
|
||||
<ng-container matColumnDef="date">
|
||||
<th mat-header-cell *matHeaderCellDef> Date </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
<span *ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'">
|
||||
{{(charge.dueDate | dateFormat) || 'Unassigned'}}
|
||||
<span
|
||||
*ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'">
|
||||
{{(charge.dueDate | dateFormat) || 'Unassigned'}}
|
||||
</span>
|
||||
<span *ngIf="charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'">
|
||||
{{(charge.feeOnMonthDay | dateFormat) || 'Unassigned'}}
|
||||
{{(charge.feeOnMonthDay | dateFormat) || 'Unassigned'}}
|
||||
</span>
|
||||
<span
|
||||
*ngIf="!(charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'
|
||||
<span *ngIf="!(charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'
|
||||
|| charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee')">
|
||||
N/A
|
||||
</span>
|
||||
<button mat-icon-button color="primary"
|
||||
*ngIf="charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Annual Fee'
|
||||
|| charge.chargeTimeType.value === 'Specified due date'"
|
||||
(click)="editChargeDate(charge)">
|
||||
<button mat-icon-button color="primary" *ngIf="charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Annual Fee'
|
||||
|| charge.chargeTimeType.value === 'Specified due date'" (click)="editChargeDate(charge)">
|
||||
<fa-icon icon="pen"></fa-icon>
|
||||
</button>
|
||||
</td>
|
||||
@@ -75,8 +75,8 @@
|
||||
<ng-container matColumnDef="repaymentsEvery">
|
||||
<th mat-header-cell *matHeaderCellDef> Repayments Every </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.feeInterval || 'Not Provided' }}
|
||||
<button mat-icon-button color="primary"
|
||||
{{ charge.feeInterval || 'Not Provided' }}
|
||||
<button mat-icon-button color="primary"
|
||||
*ngIf="charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Monthly Fee'"
|
||||
(click)="editChargeFeeInterval(charge)">
|
||||
<fa-icon icon="pen"></fa-icon>
|
||||
|
||||
+5
-3
@@ -59,20 +59,22 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
private dateUtils: Dates) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.currencyCode.valueChanges.subscribe(() => {
|
||||
if (this.savingsAccountTemplate) {
|
||||
if (!this.isChargesPatched && this.savingsAccountTemplate.charges) {
|
||||
this.chargesDataSource = this.savingsAccountTemplate.charges.map((charge: any) => ({...charge, id: charge.chargeId})) || [];
|
||||
this.chargesDataSource = this.savingsAccountProductTemplate.charges.map((charge: any) => ({...charge, id: charge.chargeId})) || [];
|
||||
this.isChargesPatched = true;
|
||||
} else {
|
||||
this.chargesDataSource = [];
|
||||
}
|
||||
this.dataSource = new MatTableDataSource<any>(this.activeClientMembers);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
if (this.savingsAccountProductTemplate) {
|
||||
this.chargeData = this.savingsAccountProductTemplate.chargeOptions;
|
||||
this.chargesDataSource = this.savingsAccountProductTemplate.charges.map((charge: any) => ({...charge, id: charge.chargeId})) || [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -12,6 +12,11 @@
|
||||
<input type="number" matInput formControlName="decimal">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Currency in multiples of</mat-label>
|
||||
<input type="number" matInput formControlName="currencyMultiple" >
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Nominal Annual Interest Rate</mat-label>
|
||||
<input type="number" matInput formControlName="nominalAnnualInterestRate" required>
|
||||
@@ -32,11 +37,6 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Currency in multiples of</mat-label>
|
||||
<input type="number" matInput formControlName="currencyMultiple" >
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Interest Posting Period</mat-label>
|
||||
<mat-select formControlName="interestPostingPeriodType" required>
|
||||
|
||||
+14
-1
@@ -51,7 +51,20 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
|
||||
'currencyCode': this.savingsAccountProductTemplate.currency.code,
|
||||
'decimal': this.savingsAccountProductTemplate.currency.decimalPlaces,
|
||||
'currencyMultiple': this.savingsAccountProductTemplate.currency.inMultiplesOf,
|
||||
'minBalanceForInterestCalculation': this.savingsAccountProductTemplate.minBalanceForInterestCalculation
|
||||
'minBalanceForInterestCalculation': this.savingsAccountProductTemplate.minBalanceForInterestCalculation,
|
||||
'nominalAnnualInterestRate': this.savingsAccountProductTemplate.nominalAnnualInterestRate,
|
||||
'interestCompoundingPeriodType': this.savingsAccountProductTemplate.interestCompoundingPeriodType.id,
|
||||
'interestPostingPeriodType': this.savingsAccountProductTemplate.interestPostingPeriodType.id,
|
||||
'interestCalculationType': this.savingsAccountProductTemplate.interestCalculationType.id,
|
||||
'interestCalculationDaysInYearType': this.savingsAccountProductTemplate.interestCalculationDaysInYearType.id,
|
||||
'minRequiredOpeningBalance': this.savingsAccountProductTemplate.minRequiredOpeningBalance,
|
||||
'allowOverdraft': this.savingsAccountProductTemplate.allowOverdraft,
|
||||
'overdraftLimit': this.savingsAccountProductTemplate.overdraftLimit,
|
||||
'enforceMinRequiredBalance': this.savingsAccountProductTemplate.enforceMinRequiredBalance,
|
||||
'minOverdraftForInterestCalculation': this.savingsAccountProductTemplate.minOverdraftForInterestCalculation,
|
||||
'nominalAnnualInterestRateOverdraft': this.savingsAccountProductTemplate.nominalAnnualInterestRateOverdraft,
|
||||
'minRequiredBalance': this.savingsAccountProductTemplate.minRequiredBalance,
|
||||
'withdrawalFeeForTransfers': this.savingsAccountProductTemplate.withdrawalFeeForTransfers
|
||||
});
|
||||
this.setOptions();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ export class SettingsService {
|
||||
public static businessDateConfigName = 'enable_business_date';
|
||||
public static businessDateType = 'BUSINESS_DATE';
|
||||
public static cobDateType = 'COB_DATE';
|
||||
maxAllowedDate = new Date(2100, 0, 1);
|
||||
|
||||
constructor(private alertService: AlertService,
|
||||
private dateUtils: Dates) { }
|
||||
@@ -73,7 +74,7 @@ export class SettingsService {
|
||||
* Sets server Date config is enabled
|
||||
* @param {string} enabled
|
||||
*/
|
||||
setBusinessDateConfig(enabled: string) {
|
||||
setBusinessDateConfig(enabled: string) {
|
||||
localStorage.setItem('mifosXServerBusinessDateEnabled', enabled);
|
||||
}
|
||||
|
||||
@@ -121,21 +122,28 @@ export class SettingsService {
|
||||
/**
|
||||
* Returns current Business date server
|
||||
*/
|
||||
get businessDate(): Date {
|
||||
get businessDate(): Date {
|
||||
return this.dateUtils.convertToDate(localStorage.getItem('mifosXServerDate'), SettingsService.businessDateFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns current Business date Config if it's enabled
|
||||
*/
|
||||
get businessDateConfig(): any {
|
||||
get businessDateConfig(): any {
|
||||
return localStorage.getItem('mifosXServerBusinessDateEnabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns max Future date
|
||||
*/
|
||||
get maxFutureDate(): Date {
|
||||
return this.maxAllowedDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate If the enable_business_date configuration is enabled or disabled.
|
||||
*/
|
||||
validateBusinessDateStatus(configurations: any) {
|
||||
validateBusinessDateStatus(configurations: any) {
|
||||
configurations.some((config: any) => {
|
||||
if (config.name === SettingsService.businessDateConfigName) {
|
||||
return config.enabled;
|
||||
|
||||
@@ -50,14 +50,16 @@
|
||||
|
||||
<ng-container matColumnDef="previousRunTime">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Previous Run </th>
|
||||
<td mat-cell *matCellDef="let job"> {{ job.lastRunHistory.jobRunStartTime }} </td>
|
||||
<td mat-cell *matCellDef="let job"><span *ngIf="job.lastRunHistory">{{ job.lastRunHistory.jobRunStartTime }}</span></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="previousRunStatus">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Previous Run Status </th>
|
||||
<td mat-cell *matCellDef="let job" class="center">
|
||||
<fa-icon *ngIf="job.lastRunHistory.status === 'success'" class="success" matTooltip="Successful" matTooltipPosition="right" icon="check-circle" size="lg"></fa-icon>
|
||||
<fa-icon *ngIf="!(job.lastRunHistory.status == 'success')" class="fail" matTooltip="Failed" matTooltipPosition="right" icon="times-circle" size="lg"></fa-icon>
|
||||
<div *ngIf="job.lastRunHistory">
|
||||
<fa-icon *ngIf="job.lastRunHistory.status === 'success'" class="success" matTooltip="Successful" matTooltipPosition="right" icon="check-circle" size="lg"></fa-icon>
|
||||
<fa-icon *ngIf="!(job.lastRunHistory.status == 'success')" class="fail" matTooltip="Failed" matTooltipPosition="right" icon="times-circle" size="lg"></fa-icon>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
@@ -73,7 +75,7 @@
|
||||
<ng-container matColumnDef="errorLog">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Error Log </th>
|
||||
<td mat-cell *matCellDef="let job" class="center">
|
||||
<button mat-icon-button class="errorlog" *ngIf="!(job.lastRunHistory.status == 'success')" matTooltip="Error Log" matTooltipPosition="right" >
|
||||
<button mat-icon-button class="errorlog" *ngIf="!(job.lastRunHistory && job.lastRunHistory.status == 'success')" matTooltip="Error Log" matTooltipPosition="right" >
|
||||
<fa-icon icon="exclamation-circle" size="lg"></fa-icon>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
+1
-6
@@ -17,14 +17,9 @@
|
||||
<td mat-cell *matCellDef="let jobHistoryData"> {{ jobHistoryData.version }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="run_start_time">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Run Start Time </th>
|
||||
<td mat-cell *matCellDef="let jobHistoryData"> {{ jobHistoryData.jobRunStartTime }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Status </th>
|
||||
<td mat-cell *matCellDef="let jobHistoryData">
|
||||
<td mat-cell *matCellDef="let jobHistoryData">
|
||||
<fa-icon *ngIf="jobHistoryData.status === 'success'" class="success" matTooltip="Successful" matTooltipPosition="right" icon="check-circle" size="lg"></fa-icon>
|
||||
<fa-icon *ngIf="!(jobHistoryData.status == 'success')" class="fail" matTooltip="Failed" matTooltipPosition="right" icon="times-circle" size="lg"></fa-icon>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user