feat: create report tenant
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f4ecbf0e66
commit
d1b20e6b96
|
@ -0,0 +1,22 @@
|
||||||
|
import { REPORT_GROUP } from '../../../constant';
|
||||||
|
import { ReportConfigEntity } from '../../../entities/report-config.entity';
|
||||||
|
import IncomeReportPerItemMaster from '../../transaction-report/configs/income-per-item-master';
|
||||||
|
|
||||||
|
export default <ReportConfigEntity>{
|
||||||
|
...IncomeReportPerItemMaster,
|
||||||
|
group_name: REPORT_GROUP.tenant_report,
|
||||||
|
unique_name: `${REPORT_GROUP.tenant_report}__income_per_item_master`,
|
||||||
|
whereCondition(filterModel) {
|
||||||
|
const queryFilter = [];
|
||||||
|
const breakdown = filterModel.tr_item__breakdown_bundling;
|
||||||
|
if (breakdown) {
|
||||||
|
console.log({ breakdown });
|
||||||
|
const value = breakdown.filter.map((item) => {
|
||||||
|
return item === 'Yes' ? true : false;
|
||||||
|
});
|
||||||
|
|
||||||
|
queryFilter.push(`tr_item.breakdown_bundling in (${value.join()})`);
|
||||||
|
}
|
||||||
|
return queryFilter;
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { REPORT_GROUP } from '../../../constant';
|
||||||
|
import { ReportConfigEntity } from '../../../entities/report-config.entity';
|
||||||
|
import IncomeReportPerItem from '../../transaction-report/configs/income-per-item';
|
||||||
|
|
||||||
|
export default <ReportConfigEntity>{
|
||||||
|
...IncomeReportPerItem,
|
||||||
|
group_name: REPORT_GROUP.tenant_report,
|
||||||
|
unique_name: `${REPORT_GROUP.tenant_report}__income_per_item`,
|
||||||
|
};
|
|
@ -1,39 +0,0 @@
|
||||||
import { DATA_FORMAT, DATA_TYPE, REPORT_GROUP } from '../../../constant';
|
|
||||||
import { ReportConfigEntity } from '../../../entities/report-config.entity';
|
|
||||||
|
|
||||||
export default <ReportConfigEntity>{
|
|
||||||
group_name: REPORT_GROUP.tenant_report,
|
|
||||||
unique_name: `${REPORT_GROUP.tenant_report}__sample`,
|
|
||||||
label: 'Sample Tenant Report',
|
|
||||||
table_schema: 'season_types main',
|
|
||||||
main_table_alias: 'main',
|
|
||||||
defaultOrderBy: [],
|
|
||||||
lowLevelOrderBy: [],
|
|
||||||
filter_period_config: {
|
|
||||||
hidden: true,
|
|
||||||
},
|
|
||||||
column_configs: [
|
|
||||||
{
|
|
||||||
column: 'main__created_at',
|
|
||||||
query: 'main.created_at',
|
|
||||||
label: 'Created Date',
|
|
||||||
type: DATA_TYPE.DIMENSION,
|
|
||||||
format: DATA_FORMAT.DATE_EPOCH,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
column: 'main__updated_at',
|
|
||||||
query: 'main.updated_at',
|
|
||||||
label: 'Updated Date',
|
|
||||||
type: DATA_TYPE.DIMENSION,
|
|
||||||
format: DATA_FORMAT.DATE_EPOCH,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
column: 'main__name',
|
|
||||||
query: 'main.name',
|
|
||||||
label: 'Name',
|
|
||||||
type: DATA_TYPE.DIMENSION,
|
|
||||||
format: DATA_FORMAT.TEXT,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
filter_configs: [],
|
|
||||||
};
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { ReportConfigEntity } from '../../entities/report-config.entity';
|
import { ReportConfigEntity } from '../../entities/report-config.entity';
|
||||||
import SampleReport from './configs/sample.report';
|
import IncomeReportPerItem from './configs/income-per-item';
|
||||||
|
import IncomeReportPerItemMaster from './configs/income-per-item-master';
|
||||||
|
|
||||||
export const TenantReportConfig: ReportConfigEntity[] = [
|
export const TenantReportConfig: ReportConfigEntity[] = [
|
||||||
// SampleReport
|
IncomeReportPerItem,
|
||||||
|
IncomeReportPerItemMaster,
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue