-
Notifications
You must be signed in to change notification settings - Fork 17
Release 3.6.0 into main #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
994675c
d3694fa
c23aa21
20e7606
da29107
e8668e3
7a56ed2
18054b6
347742a
976abbd
e2b55a8
574fb6b
875ae43
2869937
6df003c
f8430ac
de118bf
6a9be15
ab8ca49
4c5c835
41045f6
1725878
d22c9fd
101baf4
8a507c7
f21b90f
f0e5735
0ab27a9
0ef04e1
a93f88c
1991848
50bb9b4
d21a390
b9cc53e
6b06aa2
4646fc3
dd97cc7
9de5103
cc4b171
54ddd77
df6a1c0
a391775
0cd124b
1f94f37
1460199
84fcd53
2285878
2377949
222de3b
d0118b9
11c0a9f
72d328f
dec1fd2
a10bcca
24181ab
22103aa
eedbf98
52e97b8
18200f2
f9c285f
3a3a576
a9b3354
18575ef
09f0244
b87f2b6
e68be94
931e06c
a61272e
1bb920c
70f11ab
4fa9cea
06f8936
d5a4229
bf0282a
2c335de
f266cc6
00604de
41e6c68
67688b8
60a068e
e2d9221
e8bced6
9e2c073
7b9e64d
e1e48f9
34eceeb
f2ca9c9
ff531bd
32c0937
41c7439
d5025ba
f79452e
fdfb9e3
5dffc48
77529d0
35d3605
7dbfe2f
58cb284
7fd6aac
529179d
e8b2429
76c27d9
fb2597d
bf49b8b
3148aed
6a148d8
21fa316
5b4a193
cb5e417
2797b73
297129a
931457d
3088f89
e464f3e
46038e4
b5474a9
ec4d690
73fddbf
44c5d9c
bc2878a
ae58732
bf728d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,36 @@ | |
| <tr style="color: #595959; font-size: 14px"> | ||
| <td>{{ beneficiary?.benName }}</td> | ||
| </tr> | ||
| <ng-container *ngIf="beneficiary?.fatherName"> | ||
| <tr style="font-size: 14px; color: #000000"> | ||
| <th id="fatherName"> | ||
| {{ current_language_set?.bendetails?.fatherName }}: | ||
| </th> | ||
| </tr> | ||
| <tr style="color: #595959; font-size: 14px"> | ||
| <td>{{ beneficiary?.fatherName }}</td> | ||
| </tr> | ||
| </ng-container> | ||
| <ng-container *ngIf="beneficiary?.lastName"> | ||
| <tr style="font-size: 14px; color: #000000"> | ||
| <th id="lastName"> | ||
| {{ current_language_set?.bendetails?.lastName }}: | ||
| </th> | ||
| </tr> | ||
| <tr style="color: #595959; font-size: 14px"> | ||
| <td>{{ beneficiary?.lastName }}</td> | ||
| </tr> | ||
| </ng-container> | ||
| <ng-container *ngIf="beneficiary?.preferredPhoneNum"> | ||
| <tr style="font-size: 14px; color: #000000"> | ||
| <th id="phoneNo"> | ||
| {{ current_language_set?.bendetails?.phoneNo }}: | ||
| </th> | ||
| </tr> | ||
| <tr style="color: #595959; font-size: 14px"> | ||
| <td>{{ beneficiary?.preferredPhoneNum }}</td> | ||
| </tr> | ||
| </ng-container> | ||
|
Comment on lines
+23
to
+52
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent field display between flow status blocks. These three new fields (fatherName, lastName, preferredPhoneNum) are only displayed when 🔎 Verify and align the second blockAdd the same three conditional sections to the second table block (after line 151) to ensure consistent display of beneficiary information regardless of flow status: <tr style="color: #595959; font-size: 14px">
<td>{{ beneficiaryName | titlecase }}</td>
</tr>
+ <ng-container *ngIf="beneficiary?.fatherName">
+ <tr style="font-size: 14px; color: #000000">
+ <th id="fatherName">
+ {{ current_language_set?.bendetails?.fatherName }}:
+ </th>
+ </tr>
+ <tr style="color: #595959; font-size: 14px">
+ <td>{{ beneficiary?.fatherName }}</td>
+ </tr>
+ </ng-container>
+ <ng-container *ngIf="beneficiary?.lastName">
+ <tr style="font-size: 14px; color: #000000">
+ <th id="lastName">
+ {{ current_language_set?.bendetails?.lastName }}:
+ </th>
+ </tr>
+ <tr style="color: #595959; font-size: 14px">
+ <td>{{ beneficiary?.lastName }}</td>
+ </tr>
+ </ng-container>
+ <ng-container *ngIf="beneficiary?.preferredPhoneNum">
+ <tr style="font-size: 14px; color: #000000">
+ <th id="phoneNo">
+ {{ current_language_set?.bendetails?.phoneNo }}:
+ </th>
+ </tr>
+ <tr style="color: #595959; font-size: 14px">
+ <td>{{ beneficiary?.preferredPhoneNum }}</td>
+ </tr>
+ </ng-container>
<tr style="font-size: 14px; color: #000000">
<th id="beneficiaryName">{{ current_language_set?.familyId }}:</th>
</tr>
🤖 Prompt for AI Agents |
||
| <tr style="font-size: 14px; color: #000000"> | ||
| <th id="gender"> | ||
| {{ current_language_set?.bendetails?.gender }} / | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,16 +51,27 @@ export class HttpInterceptorService implements HttpInterceptor { | |
| this.assignSelectedLanguage(); | ||
| const key: any = sessionStorage.getItem('key'); | ||
| let modifiedReq = null; | ||
| if (key !== undefined && key !== null) { | ||
| modifiedReq = req.clone({ | ||
| headers: req.headers | ||
| .set('Authorization', key) | ||
| .set('Content-Type', 'application/json'), | ||
| }); | ||
|
|
||
| const isPlatformFeedback = | ||
| req.url && req.url.toLowerCase().includes('/platform-feedback'); | ||
|
|
||
| if (isPlatformFeedback) { | ||
| const headers = req.headers | ||
| .delete('Authorization') | ||
| .set('Content-Type', 'application/json'); | ||
| modifiedReq = req.clone({ headers }); | ||
| } else { | ||
| modifiedReq = req.clone({ | ||
| headers: req.headers.set('Authorization', ''), | ||
| }); | ||
| if (key !== undefined && key !== null) { | ||
| modifiedReq = req.clone({ | ||
| headers: req.headers | ||
| .set('Authorization', key) | ||
| .set('Content-Type', 'application/json'), | ||
| }); | ||
| } else { | ||
| modifiedReq = req.clone({ | ||
| headers: req.headers.set('Authorization', ''), | ||
| }); | ||
| } | ||
| } | ||
| return next.handle(modifiedReq).pipe( | ||
| tap((event: HttpEvent<any>) => { | ||
|
|
@@ -76,6 +87,29 @@ export class HttpInterceptorService implements HttpInterceptor { | |
| catchError((error: HttpErrorResponse) => { | ||
| console.error(error); | ||
| this.spinnerService.setLoading(false); | ||
| if (error.status === 401) { | ||
| this.handleSessionExpiry( | ||
| this.currentLanguageSet.sessionExpiredPleaseLogin || | ||
| 'Session has expired, please login again.', | ||
| ); | ||
| } else if (error.status === 403) { | ||
| this.handleSessionExpiry( | ||
| this.currentLanguageSet.accessDenied || | ||
| 'Access Denied. You do not have permission to access this resource.', | ||
| ); | ||
| } else if (error.status === 500) { | ||
| this.handleSessionExpiry( | ||
| this.currentLanguageSet.internaleServerError, | ||
| ); | ||
| } else { | ||
| this.handleSessionExpiry( | ||
| error.message || | ||
| this.currentLanguageSet.somethingWentWrong || | ||
| 'Something went wrong. Please try again later.', | ||
| ); | ||
| } | ||
| sessionStorage.clear(); | ||
| this.sessionstorage.clear(); | ||
| return throwError(error.error); | ||
|
Comment on lines
+90
to
113
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Session clearing on all HTTP errors is overly aggressive. The current implementation clears session storage on any HTTP error (lines 111-112), including transient errors like 404 or 503. This could unexpectedly log users out due to temporary network issues or non-critical API failures. Additionally, line 102 uses 🔎 Suggested fix } else if (error.status === 500) {
this.handleSessionExpiry(
- this.currentLanguageSet.internaleServerError,
+ this.currentLanguageSet.internalServerError ||
+ 'Internal server error. Please try again later.',
);
} else {
- this.handleSessionExpiry(
- error.message ||
- this.currentLanguageSet.somethingWentWrong ||
- 'Something went wrong. Please try again later.',
- );
+ // Only clear session for auth-related errors (401, 403)
+ // For other errors, show message without session termination
+ this.confirmationService.alert(
+ error.message ||
+ this.currentLanguageSet.somethingWentWrong ||
+ 'Something went wrong. Please try again later.',
+ 'error',
+ );
+ return throwError(error.error);
}
sessionStorage.clear();
this.sessionstorage.clear();Consider moving session clearing inside the specific 401/403 handlers rather than applying it universally.
🤖 Prompt for AI Agents |
||
| }), | ||
| ); | ||
|
|
@@ -98,7 +132,8 @@ export class HttpInterceptorService implements HttpInterceptor { | |
| 'Unable to fetch session object from Redis server' | ||
| ) { | ||
| this.handleSessionExpiry( | ||
| this.currentLanguageSet.sessionExpiredPleaseLogin, | ||
| this.currentLanguageSet.sessionExpiredPleaseLogin || | ||
| 'Session has expired, please login again.', | ||
| ); | ||
| } else { | ||
| this.startTimer(); | ||
|
|
@@ -140,7 +175,8 @@ export class HttpInterceptorService implements HttpInterceptor { | |
| sessionStorage.clear(); | ||
| this.sessionstorage.clear(); | ||
| this.confirmationService.alert( | ||
| this.currentLanguageSet.sessionExpired, | ||
| this.currentLanguageSet.sessionExpired || | ||
| 'Session has expired, please login again.', | ||
| 'error', | ||
| ); | ||
| this.router.navigate(['/login']); | ||
|
|
@@ -150,7 +186,8 @@ export class HttpInterceptorService implements HttpInterceptor { | |
| sessionStorage.clear(); | ||
| this.sessionstorage.clear(); | ||
| this.confirmationService.alert( | ||
| this.currentLanguageSet.sessionExpired, | ||
| this.currentLanguageSet.sessionExpired || | ||
| 'Session has expired, please login again.', | ||
| 'error', | ||
| ); | ||
| this.router.navigate(['/login']); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ import { Component, OnInit, Input, DoCheck } from '@angular/core'; | |
| import { FormGroup } from '@angular/forms'; | ||
| import { HttpServiceService } from 'src/app/app-modules/core/services/http-service.service'; | ||
| import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; | ||
| import { AmritTrackingService } from 'Common-UI/src/tracking'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify the import path is properly configured
# Check tsconfig.json for path mappings
if [ -f tsconfig.json ]; then
echo "=== tsconfig.json path mappings ==="
cat tsconfig.json | jq '.compilerOptions.paths' 2>/dev/null || cat tsconfig.json | grep -A 20 '"paths"'
fi
# Check if the source file exists
echo -e "\n=== Searching for tracking module ==="
fd -t f "tracking\.(ts|js)$" 2>/dev/null | head -20
# Check package.json for Common-UI dependency
if [ -f package.json ]; then
echo -e "\n=== Checking package.json for Common-UI ==="
cat package.json | jq '.dependencies["Common-UI"], .devDependencies["Common-UI"]' 2>/dev/null || grep -i "common-ui" package.json
fi
# Also check for Common-UI directory
echo -e "\n=== Searching for Common-UI directory ==="
fd -t d "Common-UI" 2>/dev/null | head -10Repository: PSMRI/HWC-UI Length of output: 239 🏁 Script executed: #!/bin/bash
# Check the structure of Common-UI
echo "=== Common-UI directory structure ==="
ls -la Common-UI/ 2>/dev/null | head -20
# Look for tracking module in Common-UI
echo -e "\n=== Searching for tracking in Common-UI ==="
find Common-UI -name "*tracking*" -type f 2>/dev/null | head -20
# Read tsconfig.json directly
echo -e "\n=== Full tsconfig.json content ==="
cat tsconfig.json | head -80
# Check for any typescript configuration files
echo -e "\n=== Looking for tsconfig variations ==="
find . -maxdepth 2 -name "tsconfig*.json" -type f 2>/dev/nullRepository: PSMRI/HWC-UI Length of output: 1365 🏁 Script executed: #!/bin/bash
# Check tsconfig.app.json
echo "=== tsconfig.app.json content ==="
cat tsconfig.app.json
# Check for webpack or other build configs
echo -e "\n=== Build configuration files ==="
ls -la | grep -E "(webpack|angular\.json|build)"
# Check angular.json for path configurations
if [ -f angular.json ]; then
echo -e "\n=== angular.json (first 100 lines) ==="
cat angular.json | head -100
fiRepository: PSMRI/HWC-UI Length of output: 3655 🏁 Script executed: #!/bin/bash
# Search for other imports from Common-UI
echo "=== All imports from Common-UI ==="
rg "from ['\"]Common-UI" --type ts --type tsx -A 0 -B 0 | head -50
# Count how many files use Common-UI imports
echo -e "\n=== Count of files with Common-UI imports ==="
rg "from ['\"]Common-UI" --type ts --type tsx -l | wc -l
# Check if there's a package.json in Common-UI
echo -e "\n=== Check Common-UI for package.json or index files ==="
ls -la Common-UI/ || echo "Empty directory confirmed"
find . -path "./Common-UI*" -type f 2>/dev/null | head -20Repository: PSMRI/HWC-UI Length of output: 380 Fix the broken import path for The import 🤖 Prompt for AI Agents |
||
|
|
||
| @Component({ | ||
| selector: 'app-diagnosis', | ||
|
|
@@ -40,7 +41,10 @@ export class DiagnosisComponent implements OnInit, DoCheck { | |
| caseRecordMode!: string; | ||
| current_language_set: any; | ||
|
|
||
| constructor(public httpServiceService: HttpServiceService) {} | ||
| constructor( | ||
| public httpServiceService: HttpServiceService, | ||
| private trackingService: AmritTrackingService, | ||
| ) {} | ||
|
|
||
| ngOnInit() { | ||
| this.assignSelectedLanguage(); | ||
|
|
@@ -54,4 +58,8 @@ export class DiagnosisComponent implements OnInit, DoCheck { | |
| getLanguageJson.setLanguage(); | ||
| this.current_language_set = getLanguageJson.currentLanguageObject; | ||
| } | ||
|
|
||
| trackFieldInteraction(fieldName: string) { | ||
| this.trackingService.trackFieldInteraction(fieldName, 'Diagnosis'); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: PSMRI/HWC-UI
Length of output: 1011
🏁 Script executed:
Repository: PSMRI/HWC-UI
Length of output: 381
🏁 Script executed:
Repository: PSMRI/HWC-UI
Length of output: 2827
🏁 Script executed:
Repository: PSMRI/HWC-UI
Length of output: 1010
🏁 Script executed:
Repository: PSMRI/HWC-UI
Length of output: 273
Add missing
platform_feedbacktranslation to Kannada.json.The footer feedback link has been successfully configured with the correct route, query parameter, and language keys—except that
src/assets/Kannada.jsonis missing theplatform_feedbackobject entirely. English, Hindi, and Assamese translation files all contain it, but Kannada users will fall back to the hardcoded "Feedback" string. Add the missing translation key to Kannada.json to maintain consistency across all supported languages.🤖 Prompt for AI Agents