Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8d8faf6
feat(tracking): added tracking service throughout all ui components
Jul 22, 2025
12ba761
Merge branch 'PSMRI:main' into tracking-service
abhijeetw035 Jul 22, 2025
e923aa8
feat: added platform in environments
Jul 22, 2025
0edab29
fix: fixed redundant click events
Jul 22, 2025
95441c6
feat(tracking): added userID after login success
Aug 1, 2025
94c7000
fix: fixed siteid in ci prebuild script
Aug 6, 2025
545ab14
fix: amm-636 short expiry report (#93)
snehar-nd Aug 11, 2025
75337b3
fix: amm-1250 Item entered date column added in the inventory report …
5Amogh Aug 25, 2025
4cd584f
Merge pull request #91 from abhijeetw035/tracking-service
5Amogh Aug 28, 2025
2c5df80
Update pom.xml
5Amogh Sep 25, 2025
2da8bfd
Update pom.xml
5Amogh Sep 25, 2025
e2f1f88
fix: amm-997 rolebase login
snehar-nd Oct 28, 2025
1761aea
Merge pull request #105 from PSMRI/sn/3.4.1
snehar-nd Oct 29, 2025
c3538b0
Merge pull request #106 from PSMRI/release-3.4.1
5Amogh Dec 3, 2025
07cba55
Merge branch 'release-3.6.0' into release-3.8.0
5Amogh Dec 3, 2025
2e42ca7
Merge pull request #107 from PSMRI/release-3.8.0
5Amogh Dec 3, 2025
d504ce5
fix: common-ui ref
5Amogh Dec 4, 2025
cb037c2
fix: git conflict error fix
5Amogh Dec 4, 2025
370b551
fix: amm-1931 session expiry
snehar-nd Dec 10, 2025
05f1f6e
fix: amm-1768 multi-download issue fix
5Amogh Dec 11, 2025
932433b
fix: amm-1931 handled error messages and cleared the storage
snehar-nd Dec 11, 2025
4af66d5
fix: amm-1931 navigating to login page on expory
snehar-nd Dec 12, 2025
10a9172
Merge pull request #108 from PSMRI/sn/1931
snehar-nd Dec 12, 2025
6efc0bf
Merge pull request #109 from PSMRI/amm-1768
5Amogh Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common-UI
Submodule Common-UI updated 34 files
+307 −0 matomo-documentation.md
+220 −0 matomo-local-setup.md
+ src/assets/images/tracking-high-level-diagram.png
+37 −0 src/feedback/feedback-routing.module.ts
+48 −0 src/feedback/feedback.module.ts
+72 −0 src/feedback/pages/feedback-public-page/feedback-public-page-component.ts
+63 −0 src/feedback/services/feedback.service.ts
+131 −0 src/feedback/shared/feedback-dialog/feedback-dialog.component.html
+70 −0 src/feedback/shared/feedback-dialog/feedback-dialog.component.scss
+179 −0 src/feedback/shared/feedback-dialog/feedback-dialog.component.ts
+1 −0 src/public-api.ts
+1 −1 ...egistrar/abha-components/abha-generation-success-component/abha-generation-success-component.component.html
+1 −1 src/registrar/abha-components/abha-verify-success-component/abha-verify-success-component.component.html
+1 −1 src/registrar/abha-components/download-search-abha/download-search-abha.component.html
+1 −1 src/registrar/abha-components/download-search-abha/download-search-abha.component.ts
+1 −1 src/registrar/abha-components/generate-abha-component/generate-abha-component.component.ts
+2 −2 src/registrar/abha-components/health-id-display-modal/health-id-display-modal.component.html
+4 −3 src/registrar/registration/abha-information/abha-information.component.html
+10 −2 src/registrar/registration/abha-information/abha-information.component.ts
+21 −18 src/registrar/registration/location-information/location-information.component.html
+44 −17 src/registrar/registration/location-information/location-information.component.ts
+6 −1 src/registrar/registration/personal-information/personal-information.component.html
+12 −20 src/registrar/registration/personal-information/personal-information.component.ts
+3 −2 src/registrar/registration/registration.component.ts
+94 −120 src/registrar/search-dialog/search-dialog.component.html
+154 −33 src/registrar/search-dialog/search-dialog.component.ts
+2 −2 src/registrar/search/search.component.ts
+6 −0 src/tracking/index.ts
+110 −0 src/tracking/lib/amrit-tracking.service.ts
+192 −0 src/tracking/lib/ga-tracking.service.ts
+150 −0 src/tracking/lib/matomo-tracking.service.ts
+11 −0 src/tracking/lib/tracking-provider.ts
+36 −0 src/tracking/lib/tracking.module.ts
+25 −0 src/tracking/lib/tracking.tokens.ts
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.iemr.aam-inventory-ui</groupId>
<artifactId>aam-inventory-ui</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<name>AAM-Inventory-UI</name>
<description>Piramal - inventory: Module ui</description>
<packaging>war</packaging>
Expand Down
4 changes: 4 additions & 0 deletions scripts/ci-prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ const defaultEnvValues = {
SITE_KEY:'',
CAPTCHA_CHALLENGE_URL:'',
ENABLE_CAPTCHA: false,
SITE_ID: '2',
TRACKER_URL: 'https://matomo.piramalswasthya.org/',
TRACKING_PLATFORM: 'ci',
TRACKING_ENABLED: 'true',
};

// Generate output data
Expand Down
11 changes: 11 additions & 0 deletions src/app/app-modules/core/services/http-interceptor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ export class HttpInterceptorService implements HttpInterceptor {
catchError((error: HttpErrorResponse) => {
console.error(error);

if (error.status === 401 || error.status === 403) {
this.confirmationService.alert(
"Session expired. Please log in again to continue", 'error'
);
} else this.confirmationService.alert(
error.error.errorMessage || "Something went wrong. Please try again later.",
'error',
);
this.router.navigate(['/login']);
sessionStorage.clear();
localStorage.clear();
this.spinnerService.show();
return throwError(error.error);
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
id="requestDate"
formControlName="requestDate"
[disabled]="true"
(focus)="trackFieldInteraction('Indent Date')"
/>
<mat-datepicker-toggle
matPrefix
Expand All @@ -39,6 +40,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
allowText="alphanumeric"
maxlength="20"
formControlName="referenceNumber"
(focus)="trackFieldInteraction('Reference No')"
/>
</mat-form-field>
</div>
Expand All @@ -53,6 +55,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
allowText="alphanumericspace"
maxlength="250"
formControlName="indentReason"
(focus)="trackFieldInteraction('Reason')"
/>
</mat-form-field>
</div>
Expand Down Expand Up @@ -101,6 +104,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
"
[itemListForm]="element"
required
(focus)="trackFieldInteraction('Item Name')"
/>
<!-- *ngIf="!element.itemNameView.disabled" -->
<mat-icon
Expand Down Expand Up @@ -138,6 +142,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
name="qOH"
formControlName="qOH"
required
(focus)="trackFieldInteraction('Quantity On Hand')"
/>
</mat-form-field>
</td>
Expand Down Expand Up @@ -165,6 +170,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
[attr.maxlength]="('' + element.qOH).length"
(blur)="checkQuantity(element)"
required
(focus)="trackFieldInteraction('Required Quantity')"
/>
<!-- -->
</mat-form-field>
Expand All @@ -189,6 +195,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
name="remarks"
formControlName="remarks"
allowText="alphanumericspace"
(focus)="trackFieldInteraction('Remarks')"
/>
</mat-form-field>
</td>
Expand Down Expand Up @@ -224,7 +231,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
<button
mat-mini-fab
color="primary"
(click)="addToindentItemList()"
(click)="addToindentItemList(); trackFieldInteraction('Add Button')"
>
<mat-icon>add</mat-icon>
</button>
Expand All @@ -245,7 +252,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
mat-raised-button
matTooltip="{{ currentLanguageSet?.inventory?.back }}"
matTooltipPosition="right"
(click)="goBack()"
(click)="goBack(); trackFieldInteraction('Back Button')"
>
{{ currentLanguageSet?.inventory?.back }}
</button>
Expand All @@ -259,7 +266,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
class="pull-right m-r-5 mat_green"
*ngIf="!editMode"
[disabled]="indentRequestForm.invalid"
(click)="submitIndentRequest(indentRequestForm)"
(click)="submitIndentRequest(indentRequestForm); trackFieldInteraction('Save Button')"
>
{{ currentLanguageSet?.common?.save }}
</button>
Expand All @@ -270,7 +277,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
*ngIf="editMode"
class="pull-right m-r-5 mat_green"
[disabled]="indentRequestForm.invalid"
(click)="updateIndentRequest(indentRequestForm)"
(click)="updateIndentRequest(indentRequestForm); trackFieldInteraction('Update Button')"
>
{{ currentLanguageSet?.inventory?.update }}
</button>
Expand All @@ -281,7 +288,7 @@ <h4>{{ currentLanguageSet?.inventory?.indentRequest }}</h4>
color="primary"
class="pull-right m-r-5"
[disabled]="indentRequestForm.pristine"
(click)="resetIndentRequestForm()"
(click)="resetIndentRequestForm(); trackFieldInteraction('Clear Button')"
>
{{ currentLanguageSet?.inventory?.clear }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { LanguageService } from 'src/app/app-modules/core/services/language.serv
import { MatTableDataSource } from '@angular/material/table';
import { Subscription } from 'rxjs';
import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service';
import { AmritTrackingService } from 'Common-UI/src/tracking';

@Component({
selector: 'app-indent-request',
Expand Down Expand Up @@ -77,6 +78,7 @@ export class IndentRequestComponent implements OnInit, DoCheck {
private confirmationService: ConfirmationService,
private dataStorageService: DataStorageService,
readonly sessionstorage:SessionStorageService,
private trackingService: AmritTrackingService
) {
this.subs = this.inventoryService
.getDialogClosedObservable()
Expand Down Expand Up @@ -402,4 +404,8 @@ export class IndentRequestComponent implements OnInit, DoCheck {
this.currentLanguageSet = this.languageComponent.currentLanguageObject;
}
// -----End------

trackFieldInteraction(fieldName: string) {
this.trackingService.trackFieldInteraction(fieldName, 'Indent Request');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h4>{{ currentLanguageSet?.inventory?.subStoreIndentOrderWorklist }}</h4>
class="pull-right button-full-width"
type="button"
color="primary"
(click)="routeToRaiseRequest()"
(click)="routeToRaiseRequest(); trackFieldInteraction('Raise Request Button')"
>
{{ currentLanguageSet?.inventory?.raiseRequest }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { LanguageService } from 'src/app/app-modules/core/services/language.serv
import { MatPaginator } from '@angular/material/paginator';
import { MatTableDataSource } from '@angular/material/table';
import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service';
import { AmritTrackingService } from 'Common-UI/src/tracking';

@Component({
selector: 'app-sub-store-indent-order-worklist',
Expand Down Expand Up @@ -60,6 +61,7 @@ export class SubStoreIndentOrderWorklistComponent implements OnInit, DoCheck {
private confirmationService: ConfirmationService,
private dataStorageService: DataStorageService,
readonly sessionstorage:SessionStorageService,
private trackingService: AmritTrackingService
) {}

ngOnInit() {
Expand Down Expand Up @@ -141,4 +143,8 @@ export class SubStoreIndentOrderWorklistComponent implements OnInit, DoCheck {
this.currentLanguageSet = this.languageComponent.currentLanguageObject;
}
// -----End------

trackFieldInteraction(fieldName: string) {
this.trackingService.trackFieldInteraction(fieldName, 'Sub Store Indent Order Worklist');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h4 class="inline-block" style="font-size: larger">
class="pull-right button-full-width m-l-5"
type="button"
color="primary"
(click)="openSearchDialog()"
(click)="openSearchDialog(); trackFieldInteraction('Advance Search Button')"
>
{{ currentLanguageSet?.bendetails?.advanceSearch }}
</button>
Expand All @@ -21,6 +21,7 @@ <h4 class="inline-block" style="font-size: larger">
type="button"
color="primary"
routerLink="View"
(click)="trackFieldInteraction('Previous Records Button')"
>
{{ currentLanguageSet?.inventory?.previousRecords }}
</button>
Expand All @@ -44,6 +45,7 @@ <h4 class="inline-block" style="font-size: larger">
id="beneficiaryID"
formControlName="beneficiaryID"
(keyup)="checkBeneficiary()"
(focus)="trackFieldInteraction('Beneficiary ID')"
/>
</mat-form-field>
</div>
Expand All @@ -61,6 +63,9 @@ <h4 class="inline-block" style="font-size: larger">
!beneficiaryDetailForm.get('beneficiaryID')?.value
"
(selectionChange)="getVisitDetail()"
(selectionChange)="
trackFieldInteraction('Visit Code')
"
>
<mat-option
*ngFor="let visit of beneficiaryDetail"
Expand All @@ -83,6 +88,7 @@ <h4 class="inline-block" style="font-size: larger">
autocomplete="off"
formControlName="visitDate"
[readonly]="true"
(focus)="trackFieldInteraction('Visit Date')"
/>
<mat-datepicker-toggle
matPrefix
Expand All @@ -104,6 +110,7 @@ <h4 class="inline-block" style="font-size: larger">
id="beneficiaryName"
formControlName="beneficiaryName"
[readonly]="true"
(focus)="trackFieldInteraction('Patient Name')"
/>
</mat-form-field>
</div>
Expand All @@ -118,6 +125,7 @@ <h4 class="inline-block" style="font-size: larger">
id="beneficiaryAge"
formControlName="beneficiaryAge"
[readonly]="true"
(focus)="trackFieldInteraction('Age')"
/>
</mat-form-field>
</div>
Expand All @@ -134,6 +142,7 @@ <h4 class="inline-block" style="font-size: larger">
id="genderName"
formControlName="genderName"
[readonly]="true"
(focus)="trackFieldInteraction('Gender')"
/>
</mat-form-field>
</div>
Expand All @@ -150,6 +159,7 @@ <h4 class="inline-block" style="font-size: larger">
id="doctorName"
formControlName="doctorName"
[readonly]="true"
(focus)="trackFieldInteraction('Doctor Name')"
/>
</mat-form-field>
</div>
Expand All @@ -167,6 +177,7 @@ <h4 class="inline-block" style="font-size: larger">
formControlName="reference"
maxlength="50"
[readonly]="!dateBool"
(focus)="trackFieldInteraction('Remarks')"
/>
</mat-form-field>
</div>
Expand All @@ -182,6 +193,7 @@ <h4 class="inline-block" style="font-size: larger">
formControlName="medicineDispenseType"
[disabled]="!beneficiaryDetailForm.get('visitCode')?.value"
(change)="getBeneficiaryDetail()"
(change)="trackFieldInteraction('Type of Dispense')"
>
<mat-radio-button
color="primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { LanguageService } from '../../core/services/language.service';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { SearchComponent } from '../../core/components/search/search.component';
import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service';
import { AmritTrackingService } from 'Common-UI/src/tracking';

@Component({
selector: 'app-medicine-dispense',
Expand All @@ -49,7 +50,8 @@ export class MedicineDispenseComponent implements OnInit, OnDestroy, DoCheck {
private inventoryService: InventoryService,
public http_service: LanguageService,
private dialog: MatDialog,
readonly sessionstorage:SessionStorageService,
readonly sessionstorage: SessionStorageService,
private trackingService: AmritTrackingService
) {}

ngOnInit() {
Expand Down Expand Up @@ -316,4 +318,8 @@ export class MedicineDispenseComponent implements OnInit, OnDestroy, DoCheck {
this.currentLanguageSet = this.languageComponent.currentLanguageObject;
}
// -----End------

trackFieldInteraction(fieldName: string) {
this.trackingService.trackFieldInteraction(fieldName, 'Medicine Dispense');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ <h4 style="font-size: larger">
type="button"
color="primary"
routerLink="previousRecord"
(click)="trackFieldInteraction('Previous Records Button')"
>
{{ currentLanguageSet?.inventory?.previousRecords }}
</button>
Expand All @@ -24,9 +25,7 @@ <h4 style="font-size: larger">

<div class="row m-t-10">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3" *ngIf="!benSelected">
<mat-form-field
class="input-full-width "
>
<mat-form-field class="input-full-width">
<mat-label>{{
currentLanguageSet?.inventory?.beneficiaryIDPhoneNumber
}}</mat-label>
Expand All @@ -38,6 +37,7 @@ <h4 style="font-size: larger">
name="beneficiaryIDOrPhoneNumber"
formControlName="beneficiaryIDOrPhoneNumber"
(keyup.enter)="identityQuickSearch(beneficiaryIDOrPhoneNumber)"
(focus)="trackFieldInteraction('Beneficiary ID / Phone Number')"
/>
<mat-icon
class="search-btn"
Expand All @@ -54,9 +54,7 @@ <h4 style="font-size: larger">
style="display: flex; gap: 10px; margin-top: 30px"
>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-3 box">
<mat-form-field
class="input-full-width "
>
<mat-form-field class="input-full-width">
<mat-label>{{
currentLanguageSet?.bendetails?.beneficiaryID
}}</mat-label>
Expand All @@ -71,9 +69,7 @@ <h4 style="font-size: larger">
</mat-form-field>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-3 box">
<mat-form-field
class="input-full-width "
>
<mat-form-field class="input-full-width">
<mat-label>{{
currentLanguageSet?.bendetails?.beneficiaryName
}}</mat-label>
Expand All @@ -88,9 +84,7 @@ <h4 style="font-size: larger">
</mat-form-field>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-3 box">
<mat-form-field
class="input-full-width "
>
<mat-form-field class="input-full-width">
<mat-label>
{{ currentLanguageSet?.bendetails?.age }}
</mat-label>
Expand All @@ -105,9 +99,7 @@ <h4 style="font-size: larger">
</mat-form-field>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-3 box">
<mat-form-field
class="input-full-width "
>
<mat-form-field class="input-full-width">
<mat-label>{{ currentLanguageSet?.bendetails?.gender }}</mat-label>
<input
autocomplete="off"
Expand Down
Loading
Loading