Skip to content
Merged
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# AAM InventoryUI
[![DeepWiki](https://img.shields.io/badge/DeepWiki-PSMRI%2FHWC--Inventory--UI-blue)](https://deepwiki.com/PSMRI/HWC-Inventory-UI)


This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.10.

Expand Down Expand Up @@ -34,3 +36,4 @@ If you encounter any issues, bugs, or have feature requests, please file them in

We’d love to have you join our community discussions and get real-time support!
Join our [Discord server](https://discord.gg/FVQWsf5ENS) to connect with contributors, ask questions, and stay updated.

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.6.1</version>
<version>3.6.2</version>
<name>AAM-Inventory-UI</name>
<description>Piramal - inventory: Module ui</description>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h4>{{ currentLanguageSet?.inventory?.beneficiaryDrugIssueReport }}</h4>
mat-raised-button
class="mat_green"
color="accent"
type="submit"
type="button"
[disabled]="!beneficiaryDrugIssueForm.valid"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,12 @@ export class BeneficiaryDrugIssueReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h4>{{ currentLanguageSet?.inventory?.consumptionReport }}</h4>
mat-raised-button
color="accent"
class="mat_green"
type="submit"
type="button"
[disabled]="!consumptionForm.valid"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,12 @@ export class ConsumptionReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h4>{{ currentLanguageSet?.inventory?.dailyStockDetailsReport }}</h4>
mat-raised-button
color="accent"
class="mat_green"
type="submit"
type="button"
[disabled]="!dailyStockDetailsForm.valid"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,12 @@ export class DailyStockDetailsReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h4>{{ currentLanguageSet?.inventory?.dailyStockSummaryReport }}</h4>
<button
mat-raised-button
color="accent"
type="submit"
type="button"
class="mat_green"
[disabled]="!dailyStockSummaryForm.valid"
(click)="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,12 @@ export class DailyStockSummaryReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
mat-raised-button
color="accent"
class="mat_green w-50"
type="submit"
type="button"
[disabled]="!inwardStockForm.valid"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,12 @@ export class InwardStockReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h4>{{ currentLanguageSet?.inventory?.monthlyReport }}</h4>
mat-raised-button
color="accent"
class="mat_green"
type="submit"
type="button"
[disabled]="!monthlyForm.valid"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,12 @@ export class MonthlyReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4>{{ currentLanguageSet?.inventory?.shortExpiryReport }}</h4>
mat-raised-button
color="accent"
class="mat_green"
type="submit"
type="button"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,12 @@ export class ShortExpiryReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h4>{{ currentLanguageSet?.inventory?.transitReport }}</h4>
mat-raised-button
color="accent"
class="mat_green"
type="submit"
type="button"
[disabled]="!transitForm.valid"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,12 @@ export class TransitReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h4>{{ currentLanguageSet?.inventory?.yearlyReport }}</h4>
mat-raised-button
color="accent"
class="mat_green"
type="submit"
type="button"
[disabled]="!yearlyForm.valid"
(click)="
downloadReport(true); trackFieldInteraction('Download Button')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,12 @@ export class YearlyReportComponent implements OnInit, DoCheck {
const blob = new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
saveAs(blob, wb_name + '.xlsx');
if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, wb_name);
const filename = wb_name.replace(/ /g, '_') + '.xlsx';

if ((window as any).navigator && (window as any).navigator.msSaveBlob) {
(window as any).navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('visibility', 'hidden');
link.download = wb_name.replace(/ /g, '_') + '.xlsx';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
saveAs(blob, filename);
}
});
}
Expand Down
Loading