Skip to content

Commit d2d59a4

Browse files
committed
Resolve Conflict
2 parents 1919aa9 + 3a0b208 commit d2d59a4

File tree

81 files changed

+1353
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1353
-380
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
###############
22
### STAGE 1: Build app
33
###############
4-
ARG BUILDER_IMAGE=node:22.9.0-alpine
5-
ARG NGINX_IMAGE=nginx:1.27.4-alpine3.21-slim
4+
ARG BUILDER_IMAGE=node:24-alpine3.22
5+
ARG NGINX_IMAGE=nginx:1.29-alpine3.22-slim
66

77
FROM $BUILDER_IMAGE AS builder
88
ARG NPM_REGISTRY_URL=https://registry.npmjs.org/

src/app/accounting/accounting-rules/edit-rule/edit-rule.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
</mat-card-content>
122122

123123
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
124-
<button type="button" mat-raised-button [routerLink]="['../../']">
124+
<button type="button" mat-raised-button [routerLink]="['../']">
125125
{{ 'labels.buttons.Cancel' | translate }}
126126
</button>
127127
<button

src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.html

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
{{ 'labels.inputs.accounting.' + accountType.value | translate }}
1111
</mat-option>
1212
</mat-select>
13-
<mat-error *ngIf="glAccountForm.controls.type.hasError('required')">
13+
<mat-error
14+
*ngIf="
15+
glAccountForm.controls.type.hasError('required') &&
16+
(glAccountForm.controls.type.touched || glAccountForm.controls.type.dirty)
17+
"
18+
>
1419
{{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }}
1520
<strong>{{ 'labels.commons.required' | translate }}</strong>
1621
</mat-error>
@@ -19,7 +24,12 @@
1924
<mat-form-field class="flex-48">
2025
<mat-label>{{ 'labels.inputs.Account Name' | translate }}</mat-label>
2126
<input matInput required formControlName="name" />
22-
<mat-error *ngIf="glAccountForm.controls.name.hasError('required')">
27+
<mat-error
28+
*ngIf="
29+
glAccountForm.controls.name.hasError('required') &&
30+
(glAccountForm.controls.name.touched || glAccountForm.controls.name.dirty)
31+
"
32+
>
2333
{{ 'labels.inputs.Account Name' | translate }} {{ 'labels.commons.is' | translate }}
2434
<strong>{{ 'labels.commons.required' | translate }}</strong>
2535
</mat-error>
@@ -32,7 +42,12 @@
3242
{{ accountUsage.value }}
3343
</mat-option>
3444
</mat-select>
35-
<mat-error *ngIf="glAccountForm.controls.usage.hasError('required')">
45+
<mat-error
46+
*ngIf="
47+
glAccountForm.controls.usage.hasError('required') &&
48+
(glAccountForm.controls.usage.touched || glAccountForm.controls.usage.dirty)
49+
"
50+
>
3651
{{ 'labels.inputs.Account Usage' | translate }} {{ 'labels.commons.is' | translate }}
3752
<strong>{{ 'labels.commons.required' | translate }}</strong>
3853
</mat-error>
@@ -41,7 +56,12 @@
4156
<mat-form-field class="flex-48">
4257
<mat-label>{{ 'labels.inputs.GL Code' | translate }}</mat-label>
4358
<input matInput required formControlName="glCode" />
44-
<mat-error *ngIf="glAccountForm.controls.glCode.hasError('required')">
59+
<mat-error
60+
*ngIf="
61+
glAccountForm.controls.glCode.hasError('required') &&
62+
(glAccountForm.controls.glCode.touched || glAccountForm.controls.glCode.dirty)
63+
"
64+
>
4565
{{ 'labels.inputs.GL Code' | translate }} {{ 'labels.commons.is' | translate }}
4666
<strong>{{ 'labels.commons.required' | translate }}</strong>
4767
</mat-error>

src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,16 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit {
154154
break;
155155
}
156156
});
157-
158-
this.glAccountForm.get('type').setValue(this.accountTypeId);
159157
}
160158

161159
/**
162160
* Submits the gl account form and creates gl account,
163161
* if successful redirects to view created account.
164162
*/
165163
submit() {
164+
if (this.glAccountForm.invalid) {
165+
return;
166+
}
166167
this.accountingService.createGlAccount(this.glAccountForm.value).subscribe((response: any) => {
167168
if (this.configurationWizardService.showChartofAccounts === true) {
168169
this.configurationWizardService.showChartofAccounts = false;

src/app/accounting/chart-of-accounts/edit-gl-account/edit-gl-account.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<button
9191
mat-raised-button
9292
color="primary"
93-
[disabled]="glAccountForm.pristine"
93+
[disabled]="glAccountForm.invalid || glAccountForm.pristine"
9494
*mifosxHasPermission="'UPDATE_GLACCOUNT'"
9595
>
9696
{{ 'labels.buttons.Submit' | translate }}

src/app/clients/client-stepper/client-general-step/client-general-step.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,10 @@ export class ClientGeneralStepComponent implements OnInit {
237237
if (generalDetails.clientNonPersonDetails && generalDetails.clientNonPersonDetails.incorpValidityTillDate) {
238238
generalDetails.clientNonPersonDetails = {
239239
...generalDetails.clientNonPersonDetails,
240-
incorpValidityTillDate: this.dateUtils.formatDate(generalDetails.dateOfBirth, dateFormat),
240+
incorpValidityTillDate: this.dateUtils.formatDate(
241+
generalDetails.clientNonPersonDetails.incorpValidityTillDate,
242+
dateFormat
243+
),
241244
dateFormat,
242245
locale
243246
};

src/app/clients/edit-client/edit-client.component.html

Lines changed: 114 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,26 @@
2828

2929
<mat-form-field class="flex-24">
3030
<mat-label>{{ 'labels.inputs.Account No' | translate }}</mat-label>
31-
<input matInput formControlName="accountNo" />
31+
<input
32+
matInput
33+
formControlName="accountNo"
34+
placeholder="Account No"
35+
title="Account No"
36+
[placeholder]="'labels.inputs.Account No' | translate"
37+
[title]="'labels.inputs.Account No' | translate"
38+
/>
3239
</mat-form-field>
3340

3441
<mat-form-field class="flex-24">
3542
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
36-
<input matInput formControlName="externalId" />
43+
<input
44+
matInput
45+
formControlName="externalId"
46+
placeholder="External Id"
47+
title="External Id"
48+
[placeholder]="'labels.inputs.External Id' | translate"
49+
[title]="'labels.inputs.External Id' | translate"
50+
/>
3751
</mat-form-field>
3852
</div>
3953

@@ -43,7 +57,15 @@
4357
<mat-label>{{
4458
'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate
4559
}}</mat-label>
46-
<input matInput required formControlName="fullname" />
60+
<input
61+
matInput
62+
required
63+
formControlName="fullname"
64+
placeholder="Full Name"
65+
title="Full Name"
66+
[placeholder]="'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate"
67+
[title]="'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate"
68+
/>
4769
<mat-error *ngIf="editClientForm.controls.fullname.hasError('required')">
4870
{{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }}
4971
<strong>{{ 'labels.commons.required' | translate }}</strong>
@@ -52,7 +74,15 @@
5274

5375
<mat-form-field *ngIf="editClientForm.contains('firstname')" class="flex-32">
5476
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
55-
<input matInput required formControlName="firstname" />
77+
<input
78+
matInput
79+
required
80+
formControlName="firstname"
81+
placeholder="First Name"
82+
title="First Name"
83+
[placeholder]="'labels.inputs.First Name' | translate"
84+
[title]="'labels.inputs.First Name' | translate"
85+
/>
5686
<mat-error *ngIf="editClientForm.controls.firstname.hasError('required')">
5787
{{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }}
5888
<strong>{{ 'labels.commons.required' | translate }}</strong>
@@ -61,12 +91,27 @@
6191

6292
<mat-form-field *ngIf="editClientForm.contains('middlename')" class="flex-32">
6393
<mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label>
64-
<input matInput formControlName="middlename" />
94+
<input
95+
matInput
96+
formControlName="middlename"
97+
placeholder="Middle Name"
98+
title="Middle Name"
99+
[placeholder]="'labels.inputs.Middle Name' | translate"
100+
[title]="'labels.inputs.Middle Name' | translate"
101+
/>
65102
</mat-form-field>
66103

67104
<mat-form-field *ngIf="editClientForm.contains('lastname')" class="flex-32">
68105
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
69-
<input matInput required formControlName="lastname" />
106+
<input
107+
matInput
108+
required
109+
formControlName="lastname"
110+
placeholder="Last Name"
111+
title="Last Name"
112+
[placeholder]="'labels.inputs.Last Name' | translate"
113+
[title]="'labels.inputs.Last Name' | translate"
114+
/>
70115
<mat-error *ngIf="editClientForm.controls.lastname.hasError('required')">
71116
{{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }}
72117
<strong>{{ 'labels.commons.required' | translate }}</strong>
@@ -82,7 +127,20 @@
82127
<mat-label>{{
83128
'labels.inputs.' + getDateLabel(legalFormId, ['Date of Birth', 'Incorporation Date']) | translate
84129
}}</mat-label>
85-
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth" />
130+
<input
131+
matInput
132+
[max]="maxDate"
133+
[matDatepicker]="dateOfBirthDatePicker"
134+
formControlName="dateOfBirth"
135+
placeholder="Date of Birth"
136+
title="Date of Birth"
137+
[placeholder]="
138+
'labels.inputs.' + getDateLabel(legalFormId, ['Date of Birth', 'Incorporation Date']) | translate
139+
"
140+
[title]="
141+
'labels.inputs.' + getDateLabel(legalFormId, ['Date of Birth', 'Incorporation Date']) | translate
142+
"
143+
/>
86144
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
87145
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
88146
</mat-form-field>
@@ -144,6 +202,10 @@
144202
<mat-form-field class="flex-48" (click)="incorpValidityTillDateDatePicker.open()">
145203
<mat-label>{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</mat-label>
146204
<input
205+
placeholder="Incorporation Validity Till Date"
206+
title="Incorporation Validity Till Date"
207+
[placeholder]="'labels.inputs.Incorporation Validity Till Date' | translate"
208+
[title]="'labels.inputs.Incorporation Validity Till Date' | translate"
147209
matInput
148210
[min]="minDate"
149211
[max]="maxDate"
@@ -156,25 +218,56 @@
156218

157219
<mat-form-field class="flex-48">
158220
<mat-label>{{ 'labels.inputs.Incorporation No' | translate }}</mat-label>
159-
<input matInput formControlName="incorpNumber" />
221+
<input
222+
matInput
223+
formControlName="incorpNumber"
224+
placeholder="Incorporation No"
225+
title="Incorporation No"
226+
[placeholder]="'labels.inputs.Incorporation No' | translate"
227+
[title]="'labels.inputs.Incorporation No' | translate"
228+
/>
160229
</mat-form-field>
161230

162231
<mat-form-field class="flex-98">
163232
<mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label>
164-
<textarea matInput formControlName="remarks" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
233+
<textarea
234+
matInput
235+
formControlName="remarks"
236+
cdkTextareaAutosize
237+
cdkAutosizeMinRows="2"
238+
placeholder="Remarks"
239+
title="Remarks"
240+
[placeholder]="'labels.inputs.Remarks' | translate"
241+
[title]="'labels.inputs.Remarks' | translate"
242+
></textarea>
165243
</mat-form-field>
166244
</div>
167245

168246
<!-- Mobile No and Email Address Row -->
169247
<div class="responsive-row">
170248
<mat-form-field class="flex-48">
171249
<mat-label>{{ 'labels.inputs.Mobile No' | translate }}</mat-label>
172-
<input matInput type="text" formControlName="mobileNo" />
250+
<input
251+
matInput
252+
type="text"
253+
formControlName="mobileNo"
254+
placeholder="Mobile No"
255+
title="Mobile No"
256+
[placeholder]="'labels.inputs.Mobile No' | translate"
257+
[title]="'labels.inputs.Mobile No' | translate"
258+
/>
173259
</mat-form-field>
174260

175261
<mat-form-field class="flex-48">
176262
<mat-label>{{ 'labels.inputs.Email Address' | translate }}</mat-label>
177-
<input matInput formControlName="emailAddress" />
263+
<input
264+
matInput
265+
formControlName="emailAddress"
266+
placeholder="Email Address"
267+
title="Email Address"
268+
[placeholder]="'labels.inputs.Email Address' | translate"
269+
[title]="'labels.inputs.Email Address' | translate"
270+
/>
178271
<mat-error *ngIf="editClientForm.controls.emailAddress.errors?.email"> Email not valid </mat-error>
179272
</mat-form-field>
180273
</div>
@@ -208,6 +301,10 @@
208301
<mat-form-field class="flex-48" (click)="submittedOnDatePicker.open()">
209302
<mat-label>{{ 'labels.inputs.Submitted On' | translate }}</mat-label>
210303
<input
304+
placeholder="Submitted On"
305+
title="Submitted On"
306+
[placeholder]="'labels.inputs.Submitted On' | translate"
307+
[title]="'labels.inputs.Submitted On' | translate"
211308
matInput
212309
[min]="minDate"
213310
[max]="maxDate"
@@ -226,6 +323,10 @@
226323
<mat-form-field class="flex-48" (click)="activatedOnDatePicker.open()">
227324
<mat-label>{{ 'labels.inputs.Activated On' | translate }}</mat-label>
228325
<input
326+
placeholder="Activated On"
327+
title="Activated On"
328+
[placeholder]="'labels.inputs.Activated On' | translate"
329+
[title]="'labels.inputs.Activated On' | translate"
229330
matInput
230331
[min]="editClientForm.value.submittedOnDate"
231332
[max]="maxDate"
@@ -239,17 +340,10 @@
239340
</mat-card-content>
240341

241342
<mat-card-actions class="button-container">
242-
<button type="button" mat-raised-button [routerLink]="['../general']" class="custom-button">
343+
<button type="button" mat-raised-button [routerLink]="['../general']">
243344
{{ 'labels.buttons.Cancel' | translate }}
244345
</button>
245-
<button
246-
type="submit"
247-
mat-raised-button
248-
color="primary"
249-
[disabled]="!editClientForm.valid"
250-
(click)="submit()"
251-
class="custom-button"
252-
>
346+
<button type="submit" mat-raised-button color="primary" [disabled]="!editClientForm.valid" (click)="submit()">
253347
{{ 'labels.buttons.Submit' | translate }}
254348
</button>
255349
</mat-card-actions>

src/app/clients/edit-client/edit-client.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
padding: 0 20px;
130130
border-radius: 4px;
131131
font-weight: 500;
132-
text-transform: uppercase;
132+
text-transform: none;
133133
letter-spacing: 0.3px;
134134
font-size: 13px;
135135
margin: 0;

src/app/core/authentication/authentication.service.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
33
import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';
44

55
/** rxjs Imports */
6-
import { Observable, of } from 'rxjs';
6+
import { BehaviorSubject, Observable, of } from 'rxjs';
77
import { map } from 'rxjs/operators';
88

99
/** Custom Services */
@@ -30,6 +30,8 @@ export class AuthenticationService {
3030
}
3131
// User logged in boolean
3232
private userLoggedIn: boolean;
33+
private userLoggedIn$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
34+
public readonly isAuthenticated$ = this.userLoggedIn$.asObservable();
3335

3436
/** Denotes whether the user credentials should persist through sessions. */
3537
private rememberMe: boolean;
@@ -84,6 +86,9 @@ export class AuthenticationService {
8486
if (twoFactorAccessToken) {
8587
authenticationInterceptor.setTwoFactorAccessToken(twoFactorAccessToken.token);
8688
}
89+
// Emit the correct initial state
90+
this.userLoggedIn = true;
91+
this.userLoggedIn$.next(true);
8792
}
8893
}
8994

@@ -200,6 +205,7 @@ export class AuthenticationService {
200205
*/
201206
private onLoginSuccess(credentials: Credentials) {
202207
this.userLoggedIn = true;
208+
this.userLoggedIn$.next(true); // ✅ notify observers
203209
// Ensure the rememberMe value is preserved in credentials
204210
credentials.rememberMe = this.rememberMe;
205211

@@ -268,6 +274,7 @@ export class AuthenticationService {
268274
this.setCredentials();
269275
this.resetDialog();
270276
this.userLoggedIn = false;
277+
this.userLoggedIn$.next(false); // ✅ notify observers
271278
return of(true);
272279
}
273280

0 commit comments

Comments
 (0)