Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,21 @@

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
criteria.push({ Filter_Name: 'End_Date', value: this.endDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
criteria.push({

Check warning on line 167 in src/app/app-modules/inventory/reports/beneficiary-drug-issue-report/beneficiary-drug-issue-report.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Inventory-UI-NEXT&issues=AaDNnHaApKAa83JMlbPk&open=AaDNnHaApKAa83JMlbPk&pullRequest=178
Filter_Name: 'End_Date',
value: formatLocalDate(this.endDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,21 @@

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
criteria.push({ Filter_Name: 'End_Date', value: this.endDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
criteria.push({

Check warning on line 180 in src/app/app-modules/inventory/reports/consumption-report/consumption-report.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Inventory-UI-NEXT&issues=AaDNnHRLpKAa83JMlbPh&open=AaDNnHRLpKAa83JMlbPh&pullRequest=178
Filter_Name: 'End_Date',
value: formatLocalDate(this.endDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,21 @@

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
criteria.push({ Filter_Name: 'End_Date', value: this.endDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
criteria.push({

Check warning on line 179 in src/app/app-modules/inventory/reports/daily-stock-details-report/daily-stock-details-report.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Inventory-UI-NEXT&issues=AaDNnHbJpKAa83JMlbPl&open=AaDNnHbJpKAa83JMlbPl&pullRequest=178
Filter_Name: 'End_Date',
value: formatLocalDate(this.endDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,21 @@

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
criteria.push({ Filter_Name: 'End_Date', value: this.endDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
criteria.push({

Check warning on line 179 in src/app/app-modules/inventory/reports/daily-stock-summary-report/daily-stock-summary-report.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Inventory-UI-NEXT&issues=AaDNnHYjpKAa83JMlbPj&open=AaDNnHYjpKAa83JMlbPj&pullRequest=178
Filter_Name: 'End_Date',
value: formatLocalDate(this.endDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,21 @@

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
criteria.push({ Filter_Name: 'End_Date', value: this.endDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
criteria.push({

Check warning on line 156 in src/app/app-modules/inventory/reports/expiry-report/expiry-report.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Inventory-UI-NEXT&issues=AaDNnHeVpKAa83JMlbPn&open=AaDNnHeVpKAa83JMlbPn&pullRequest=178
Filter_Name: 'End_Date',
value: formatLocalDate(this.endDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,21 @@

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
criteria.push({ Filter_Name: 'End_Date', value: this.endDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
criteria.push({

Check warning on line 182 in src/app/app-modules/inventory/reports/inward-stock-report/inward-stock-report.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Inventory-UI-NEXT&issues=AaDNnHXWpKAa83JMlbPi&open=AaDNnHXWpKAa83JMlbPi&pullRequest=178
Filter_Name: 'End_Date',
value: formatLocalDate(this.endDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,17 @@ export class ShortExpiryReportComponent implements OnInit, DoCheck {

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,21 @@

getResponseOfSearchThenDo() {
const criteria: any = [];
criteria.push({ Filter_Name: 'Start_Date', value: this.startDate });
criteria.push({ Filter_Name: 'End_Date', value: this.endDate });
const formatLocalDate = (d: any) => {
const dt = new Date(d);
const dd = String(dt.getDate()).padStart(2, '0');
const mm = String(dt.getMonth() + 1).padStart(2, '0');
const yyyy = dt.getFullYear();
return `${dd}-${mm}-${yyyy}`;
};
criteria.push({
Filter_Name: 'Start_Date',
value: formatLocalDate(this.startDate),
});
criteria.push({

Check warning on line 157 in src/app/app-modules/inventory/reports/transit-report/transit-report.component.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Inventory-UI-NEXT&issues=AaDNnHcFpKAa83JMlbPm&open=AaDNnHcFpKAa83JMlbPm&pullRequest=178
Filter_Name: 'End_Date',
value: formatLocalDate(this.endDate),
});
this.exportToxlsx(criteria);
}
exportToxlsx(criteria: any) {
Expand Down
Loading