law-common 14.3.1-beta.0 → 14.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/index.d.ts +101 -2
- package/dist/src/api/index.js +101 -2
- package/dist/src/api/{v1/interface → interface}/address_book.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/address_book.update.dto.interface.d.ts +1 -1
- package/dist/src/api/interface/bank.entity.response.d.ts +4 -4
- package/dist/src/api/{v1/interface → interface}/billing.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/billing.create.dto.interface.js +1 -1
- package/dist/src/api/interface/billing.entity.response.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_particular_line_item.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_particular_line_item.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_reimbursement_expense.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_reimbursement_expense.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_timesheet.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_timesheet.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_transaction.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/billing_transaction.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/client.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client.create.dto.interface.js +1 -1
- package/dist/src/api/{v1/interface → interface}/client.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client_affiliate.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client_affiliate.create.dto.interface.js +1 -1
- package/dist/src/api/{v1/interface → interface}/client_affiliate.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client_debit_note.create.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/client_debit_note.update.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/client_debit_note_particulars.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client_debit_note_particulars.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client_introducing_mapping.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/client_introducing_mapping.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/client_quote.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client_quote.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/client_quote_rate.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/client_quote_rate.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/client_user_mapping.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/client_user_mapping.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/configuration.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/configuration.update.dto.interface.d.ts +2 -2
- package/dist/src/api/interface/cron_jobs.create.dto.interface.d.ts +4 -0
- package/dist/src/api/interface/cron_jobs.update.dto.interface.d.ts +4 -0
- package/dist/src/api/{v1/interface → interface}/document_upload.create.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/document_upload.update.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/entity_history.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/entity_history.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/expense_head.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/expense_head.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/gst_rate.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/gst_rate.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/holiday.create.dto.interface.d.ts +2 -2
- package/dist/src/api/interface/holiday.filter.dto.interface.d.ts +0 -3
- package/dist/src/api/{v1/interface → interface}/holiday.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/holiday_list.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/holiday_list.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/leave.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/leave.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/leave_approval.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/leave_approval.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/moving_timesheet.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/moving_timesheet.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/organization_type.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/organization_type.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/permission.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/permission.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/project.create.dto.interface.d.ts +2 -2
- package/dist/src/api/interface/project.entity.response.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/project.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/project_revenue_split.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/project_user_mapping.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/project_user_mapping.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/reimbursement.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/reimbursement.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/reimbursement_expense.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/reimbursement_expense.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/role.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/role.update.dto.interface.d.ts +1 -1
- package/dist/src/api/interface/role_permission_mapping.delete.dto.interface.d.ts +1 -1
- package/dist/src/api/interface/role_permission_mapping.update.dto.interface.d.ts +4 -0
- package/dist/src/api/{v1/interface → interface}/state.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/state.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/tds_rate.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/tds_rate.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/tds_rate_voucher_type_mapping.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/tds_rate_voucher_type_mapping.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/timesheet.create.dto.interface.d.ts +1 -1
- package/dist/src/api/interface/timesheet.entity.response.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/timesheet.update.dto.interface.d.ts +1 -1
- package/dist/src/api/interface/user.create.dto.interface.d.ts +7 -0
- package/dist/src/api/interface/user.update.dto.interface.d.ts +7 -0
- package/dist/src/api/{v1/interface → interface}/vendor.create.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/vendor.update.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/vendor_advance.create.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/vendor_advance.update.dto.interface.d.ts +3 -3
- package/dist/src/api/interface/vendor_advance.update.dto.interface.js +3 -0
- package/dist/src/api/{v1/interface → interface}/vendor_invoice.create.dto.interface.d.ts +3 -3
- package/dist/src/api/{v1/interface → interface}/vendor_invoice.update.dto.interface.d.ts +3 -3
- package/dist/src/api/interface/vendor_invoice.update.dto.interface.js +3 -0
- package/dist/src/api/{v1/interface → interface}/vendor_invoice_advance.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_invoice_advance.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_invoice_item.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_invoice_item.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/vendor_invoice_payment.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_invoice_payment.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_tds_challan.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_tds_challan.update.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_tds_liability.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/vendor_tds_liability.update.dto.interface.d.ts +2 -2
- package/dist/src/api/interface/vendor_tds_liability.update.dto.interface.js +3 -0
- package/dist/src/api/{v1/interface → interface}/voucher_type.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/voucher_type.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/website_lead.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/website_lead.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{v1/interface → interface}/website_newsletter_subscription.create.dto.interface.d.ts +2 -2
- package/dist/src/api/{v1/interface → interface}/website_newsletter_subscription.update.dto.interface.d.ts +1 -1
- package/dist/src/api/v1/index.d.ts +4 -103
- package/dist/src/api/v1/index.js +4 -103
- package/dist/src/api/v2/index.d.ts +4 -6
- package/dist/src/api/v2/index.js +4 -6
- package/dist/src/api/v2/interface/bank.create.dto.interface.d.ts +7 -0
- package/dist/src/api/v2/interface/bank.update.dto.interface.d.ts +16 -0
- package/dist/src/api/v2/interface/intermediary_bank.create.dto.interface.d.ts +6 -0
- package/dist/src/api/v2/interface/intermediary_bank.update.dto.interface.d.ts +12 -0
- package/dist/src/entities/enums/bank_action_enum.d.ts +6 -2
- package/dist/src/entities/enums/bank_action_enum.js +10 -2
- package/dist/src/entities/enums/bank_status_enum.d.ts +3 -1
- package/dist/src/entities/enums/bank_status_enum.js +2 -0
- package/dist/src/entities/flow-configs/address_book_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/address_book_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/bank_flow.config.d.ts +35 -5
- package/dist/src/entities/flow-configs/bank_flow.config.js +41 -14
- package/dist/src/entities/flow-configs/billing_flow.config.d.ts +0 -72
- package/dist/src/entities/flow-configs/billing_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/billing_transaction_flow.config.d.ts +1 -21
- package/dist/src/entities/flow-configs/billing_transaction_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/client_affiliate_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/client_affiliate_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/client_debit_note_flow.config.d.ts +0 -50
- package/dist/src/entities/flow-configs/client_debit_note_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/client_debit_note_particulars_flow.config.d.ts +0 -46
- package/dist/src/entities/flow-configs/client_debit_note_particulars_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/client_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/client_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/client_quote_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/client_quote_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/client_quote_rate_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/client_quote_rate_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/document_upload_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/document_upload_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/expense_head_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/expense_head_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/gst_rate_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/gst_rate_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/holiday_flow.config.d.ts +0 -33
- package/dist/src/entities/flow-configs/holiday_flow.config.js +11 -10
- package/dist/src/entities/flow-configs/holiday_list_flow.config.d.ts +0 -33
- package/dist/src/entities/flow-configs/holiday_list_flow.config.js +3 -10
- package/dist/src/entities/flow-configs/intermediary_bank_flow.config.d.ts +7 -0
- package/dist/src/entities/flow-configs/intermediary_bank_flow.config.js +10 -6
- package/dist/src/entities/flow-configs/leave_approval_flow.config.d.ts +0 -30
- package/dist/src/entities/flow-configs/leave_approval_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/leave_flow.config.d.ts +1 -31
- package/dist/src/entities/flow-configs/leave_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/moving_timesheet_flow.config.d.ts +0 -10
- package/dist/src/entities/flow-configs/moving_timesheet_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/organization_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/organization_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/organization_type_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/organization_type_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/project_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/project_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/reimbursement_expense_flow.config.d.ts +0 -18
- package/dist/src/entities/flow-configs/reimbursement_expense_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/reimbursement_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/reimbursement_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/state_flow.config.d.ts +0 -30
- package/dist/src/entities/flow-configs/state_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/tds_rate_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/tds_rate_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/timesheet_flow.config.d.ts +0 -46
- package/dist/src/entities/flow-configs/timesheet_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/utils/flow-config.utils.d.ts +89 -1063
- package/dist/src/entities/flow-configs/utils/flow-config.utils.js +4 -72
- package/dist/src/entities/flow-configs/vendor_advance_flow.config.d.ts +0 -30
- package/dist/src/entities/flow-configs/vendor_advance_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/vendor_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/vendor_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/vendor_invoice_advance_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/vendor_invoice_advance_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/vendor_invoice_flow.config.d.ts +0 -34
- package/dist/src/entities/flow-configs/vendor_invoice_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/vendor_invoice_payment_flow.config.d.ts +0 -30
- package/dist/src/entities/flow-configs/vendor_invoice_payment_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/vendor_tds_challan_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/vendor_tds_challan_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/vendor_tds_liability_flow.config.d.ts +0 -34
- package/dist/src/entities/flow-configs/vendor_tds_liability_flow.config.js +3 -3
- package/dist/src/entities/flow-configs/voucher_type_flow.config.d.ts +0 -26
- package/dist/src/entities/flow-configs/voucher_type_flow.config.js +3 -3
- package/dist/src/entities/index.d.ts +35 -37
- package/dist/src/entities/index.js +34 -106
- package/dist/src/entities/interface/bank.entity.interface.d.ts +5 -4
- package/dist/src/entities/interface/field-constraint/bank_field_constraints.interface.d.ts +1 -1
- package/dist/src/entities/interface/field-constraint/bank_field_constraints.interface.js +7 -1
- package/dist/src/entities/interface/field-constraint/holiday_field_constraints.interface.d.ts +9 -0
- package/dist/src/entities/interface/field-constraint/holiday_field_constraints.interface.js +6 -2
- package/dist/src/entities/interface/field-constraint/holiday_list_field_constraints.interface.d.ts +9 -0
- package/dist/src/entities/interface/field-constraint/holiday_list_field_constraints.interface.js +1 -0
- package/dist/src/entities/interface/field-constraint/user_field_constraints.interface.d.ts +6 -2
- package/dist/src/entities/interface/field-constraint/user_field_constraints.interface.js +1 -19
- package/dist/src/entities/interface/holiday.entity.interface.d.ts +1 -1
- package/dist/src/entities/interface/user.entity.interface.d.ts +11 -11
- package/dist/src/entities/model/bank.entity.model.d.ts +86 -7
- package/dist/src/entities/model/bank.entity.model.js +449 -8
- package/dist/src/entities/model/billing.entity.model.d.ts +1 -2
- package/dist/src/entities/model/entity_history.entity.model.js +1 -12
- package/dist/src/entities/model/holiday.entity.model.d.ts +8 -12
- package/dist/src/entities/model/holiday.entity.model.js +8 -20
- package/dist/src/entities/model/holiday_list.entity.model.d.ts +6 -6
- package/dist/src/entities/model/holiday_list.entity.model.js +4 -4
- package/dist/src/entities/model/intermediary_bank.entity.model.d.ts +62 -6
- package/dist/src/entities/model/intermediary_bank.entity.model.js +370 -10
- package/dist/src/entities/model/leave.entity.model.d.ts +1 -1
- package/dist/src/entities/model/moving_timesheet.entity.model.d.ts +1 -1
- package/dist/src/entities/model/permission.entity.model.d.ts +1 -0
- package/dist/src/entities/model/permission.entity.model.js +3 -0
- package/dist/src/entities/model/project.entity.model.d.ts +1 -1
- package/dist/src/entities/model/timesheet.entity.model.d.ts +1 -2
- package/dist/src/entities/model/timesheet.entity.model.js +1 -1
- package/dist/src/entities/model/to_do_list.entity.model.js +2 -2
- package/dist/src/entities/model/user.entity.model.d.ts +25 -87
- package/dist/src/entities/model/user.entity.model.js +34 -305
- package/dist/src/misc/interface/optional.interface.js +8 -8
- package/package.json +1 -1
- package/dist/src/api/v1/interface/cron_jobs.create.dto.interface.d.ts +0 -4
- package/dist/src/api/v1/interface/cron_jobs.update.dto.interface.d.ts +0 -4
- package/dist/src/api/v1/interface/role_permission_mapping.update.dto.interface.d.ts +0 -4
- package/dist/src/api/v1/interface/user.create.dto.interface.d.ts +0 -8
- package/dist/src/api/v1/interface/user.update.dto.interface.d.ts +0 -10
- package/dist/src/api/v1/interface/vendor_advance.update.dto.interface.js +0 -3
- package/dist/src/api/v1/interface/vendor_invoice.update.dto.interface.js +0 -3
- package/dist/src/api/v1/interface/vendor_tds_liability.update.dto.interface.js +0 -3
- package/dist/src/api/v2/interface/holiday.create.dto.interface.d.ts +0 -5
- package/dist/src/api/v2/interface/holiday.update.dto.interface.d.ts +0 -12
- package/dist/src/api/v2/interface/holiday_list.create.dto.interface.d.ts +0 -5
- package/dist/src/api/v2/interface/holiday_list.update.dto.interface.d.ts +0 -12
- package/dist/src/api/v2/interface/user.create.dto.interface.d.ts +0 -13
- package/dist/src/api/v2/interface/user.create.dto.interface.js +0 -33
- package/dist/src/api/v2/interface/user.update.dto.interface.d.ts +0 -19
- package/dist/src/api/v2/interface/user.update.dto.interface.js +0 -2
- package/dist/src/entities/enums/user_action_enum.d.ts +0 -9
- package/dist/src/entities/enums/user_action_enum.js +0 -20
- package/dist/src/entities/flow-configs/user_flow.config.d.ts +0 -44
- package/dist/src/entities/flow-configs/user_flow.config.js +0 -122
- /package/dist/src/api/{v1/interface → interface}/address_book.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/address_book.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_particular_line_item.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_particular_line_item.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_reimbursement_expense.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_reimbursement_expense.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_timesheet.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_timesheet.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_transaction.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/billing_transaction.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_affiliate.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_debit_note.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_debit_note.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_debit_note_particulars.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_debit_note_particulars.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_introducing_mapping.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_introducing_mapping.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_quote.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_quote.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_quote_rate.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_quote_rate.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_user_mapping.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/client_user_mapping.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/configuration.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/configuration.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/cron_jobs.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/cron_jobs.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/document_upload.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/document_upload.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/entity_history.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/entity_history.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/expense_head.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/expense_head.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/gst_rate.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/gst_rate.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/holiday.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/holiday.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/holiday_list.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/holiday_list.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/leave.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/leave.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/leave_approval.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/leave_approval.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/moving_timesheet.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/moving_timesheet.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/organization_type.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/organization_type.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/permission.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/permission.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/project.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/project.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/project_revenue_split.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/project_user_mapping.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/project_user_mapping.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/reimbursement.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/reimbursement.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/reimbursement_expense.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/reimbursement_expense.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/role.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/role.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/role_permission_mapping.create.dto.interface.d.ts +0 -0
- /package/dist/src/api/{v1/interface → interface}/role_permission_mapping.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/role_permission_mapping.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/state.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/state.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/tds_rate.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/tds_rate.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/tds_rate_voucher_type_mapping.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/tds_rate_voucher_type_mapping.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/timesheet.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/timesheet.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/user.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/user.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_advance.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_invoice.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_invoice_advance.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_invoice_advance.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_invoice_item.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_invoice_item.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_invoice_payment.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_invoice_payment.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_tds_challan.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_tds_challan.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/vendor_tds_liability.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/voucher_type.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/voucher_type.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/website_lead.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/website_lead.update.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/website_newsletter_subscription.create.dto.interface.js +0 -0
- /package/dist/src/api/{v1/interface → interface}/website_newsletter_subscription.update.dto.interface.js +0 -0
- /package/dist/src/api/v2/interface/{holiday.create.dto.interface.js → bank.create.dto.interface.js} +0 -0
- /package/dist/src/api/v2/interface/{holiday.update.dto.interface.js → bank.update.dto.interface.js} +0 -0
- /package/dist/src/api/v2/interface/{holiday_list.create.dto.interface.js → intermediary_bank.create.dto.interface.js} +0 -0
- /package/dist/src/api/v2/interface/{holiday_list.update.dto.interface.js → intermediary_bank.update.dto.interface.js} +0 -0
|
@@ -1,26 +1,105 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
2
|
+
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
3
|
+
import { IUserEntity } from "../interface/user.entity.interface";
|
|
2
4
|
import { BaseEntityModel } from "./base.entity.model";
|
|
5
|
+
import { IRowActions } from "./interface/row-actions.interface";
|
|
6
|
+
import { UserEntityModel } from "./user.entity.model";
|
|
7
|
+
import { BankActionEnum } from "../../entities";
|
|
8
|
+
import { BankStatusEnum } from "../enums/bank_status_enum";
|
|
9
|
+
import { IBankFlowConfigContextData } from "../flow-configs/bank_flow.config";
|
|
10
|
+
import { IBankEntity } from "../interface/bank.entity.interface";
|
|
11
|
+
import { BillingEntityModel } from "./billing.entity.model";
|
|
12
|
+
import { ClientEntityModel } from "./client.entity.model";
|
|
13
|
+
import { ClientAffiliateEntityModel } from "./client_affiliate.entity.model";
|
|
14
|
+
import { ClientDebitNoteEntityModel } from "./client_debit_note.entity.model";
|
|
15
|
+
import { ClientDebitNoteParticularsEntityModel } from "./client_debit_note_particulars.entity.model";
|
|
16
|
+
import { CountryEntityModel } from "./country.entity.model";
|
|
17
|
+
import { ExpenseHeadEntityModel } from "./expense_head.entity.model";
|
|
18
|
+
import { GstRateEntityModel } from "./gst_rate.entity.model";
|
|
3
19
|
import { IntermediaryBankEntityModel } from "./intermediary_bank.entity.model";
|
|
20
|
+
import { LeaveEntityModel } from "./leave.entity.model";
|
|
21
|
+
import { LeaveApprovalEntityModel } from "./leave_approval.entity.model";
|
|
22
|
+
import { OfficeLocationEntityModel } from "./office_location.entity.model";
|
|
23
|
+
import { OrganizationEntityModel } from "./organization.entity.model";
|
|
24
|
+
import { OrganizationTypeEntityModel } from "./organization_type.entity.model";
|
|
25
|
+
import { ProjectEntityModel } from "./project.entity.model";
|
|
26
|
+
import { StateEntityModel } from "./state.entity.model";
|
|
27
|
+
import { TdsRateEntityModel } from "./tds_rate.entity.model";
|
|
28
|
+
import { ToDoListEntityModel } from "./to_do_list.entity.model";
|
|
29
|
+
import { VendorEntityModel } from "./vendor.entity.model";
|
|
30
|
+
import { VendorAdvanceEntityModel } from "./vendor_advance.entity.model";
|
|
31
|
+
import { VendorInvoiceEntityModel } from "./vendor_invoice.entity.model";
|
|
32
|
+
import { VendorInvoiceAdvanceEntityModel } from "./vendor_invoice_advance.entity.model";
|
|
33
|
+
import { VendorInvoiceItemEntityModel } from "./vendor_invoice_item.entity.model";
|
|
34
|
+
import { VendorInvoicePaymentEntityModel } from "./vendor_invoice_payment.entity.model";
|
|
35
|
+
import { VendorTdsChallanEntityModel } from "./vendor_tds_challan.entity.model";
|
|
36
|
+
import { VendorTdsLiabilityEntityModel } from "./vendor_tds_liability.entity.model";
|
|
37
|
+
import { VoucherTypeEntityModel } from "./voucher_type.entity.model";
|
|
38
|
+
import { WorkFromHomeEntityModel } from "./work_from_home.entity.model";
|
|
4
39
|
export declare class BankEntityModel extends BaseEntityModel<EntityEnum.BANK> implements IBankEntity {
|
|
5
40
|
id: number;
|
|
6
41
|
accountName: string;
|
|
7
|
-
organizationId: number;
|
|
8
42
|
name: string;
|
|
9
43
|
accountNo: string;
|
|
10
44
|
branchAddress: string;
|
|
11
45
|
ifscCode: string;
|
|
12
46
|
emailForPaymentInfoCsv: string;
|
|
13
|
-
status: BankStatusEnum;
|
|
14
|
-
remark?: string;
|
|
15
47
|
swiftAddress?: string;
|
|
16
|
-
|
|
17
|
-
|
|
48
|
+
organizationId?: number;
|
|
49
|
+
remark?: string;
|
|
50
|
+
status: BankStatusEnum;
|
|
18
51
|
createdOn: number;
|
|
19
52
|
updatedOn: number;
|
|
53
|
+
createdBy: number;
|
|
54
|
+
updatedBy: number;
|
|
55
|
+
vendorTdsChallans?: VendorTdsChallanEntityModel[];
|
|
56
|
+
clientDebitNotes?: ClientDebitNoteEntityModel[];
|
|
20
57
|
intermediaryBanks?: IntermediaryBankEntityModel[];
|
|
58
|
+
billings?: BillingEntityModel[];
|
|
59
|
+
static relationConfigs: RelationConfigs<[
|
|
60
|
+
EntityEnum.VENDOR_TDS_CHALLAN,
|
|
61
|
+
EntityEnum.CLIENT_DEBIT_NOTE,
|
|
62
|
+
EntityEnum.INTERMEDIARY_BANK,
|
|
63
|
+
EntityEnum.BILLING
|
|
64
|
+
], EntityEnum.BANK>;
|
|
21
65
|
static fromEntity(entity: IBankEntity): BankEntityModel;
|
|
22
66
|
getRelationConfigs(): any[];
|
|
23
|
-
|
|
67
|
+
get tdsRates(): TdsRateEntityModel[] | undefined;
|
|
68
|
+
get organizationTypes(): OrganizationTypeEntityModel[] | undefined;
|
|
69
|
+
get vendors(): VendorEntityModel[] | undefined;
|
|
70
|
+
get states(): StateEntityModel[] | undefined;
|
|
71
|
+
get countrys(): CountryEntityModel[] | undefined;
|
|
72
|
+
get officeLocations(): OfficeLocationEntityModel[] | undefined;
|
|
73
|
+
get vendorInvoices(): VendorInvoiceEntityModel[] | undefined;
|
|
74
|
+
get vendorInvoiceItems(): VendorInvoiceItemEntityModel[] | undefined;
|
|
75
|
+
get voucherTypes(): VoucherTypeEntityModel[] | undefined;
|
|
76
|
+
get expenseHeads(): ExpenseHeadEntityModel[] | undefined;
|
|
77
|
+
get gstRates(): GstRateEntityModel[] | undefined;
|
|
78
|
+
get vendorAdvances(): VendorAdvanceEntityModel[] | undefined;
|
|
79
|
+
get vendorInvoiceAdvances(): VendorInvoiceAdvanceEntityModel[] | undefined;
|
|
80
|
+
get vendorInvoicePayments(): VendorInvoicePaymentEntityModel[] | undefined;
|
|
81
|
+
get organizations(): OrganizationEntityModel[] | undefined;
|
|
82
|
+
get vendorTdsLiabilitys(): VendorTdsLiabilityEntityModel[] | undefined;
|
|
83
|
+
get clients(): ClientEntityModel[] | undefined;
|
|
84
|
+
get users(): UserEntityModel[] | undefined;
|
|
85
|
+
get leaveApprovals(): LeaveApprovalEntityModel[] | undefined;
|
|
86
|
+
get leaves(): LeaveEntityModel[] | undefined;
|
|
87
|
+
get workFromHomes(): WorkFromHomeEntityModel[] | undefined;
|
|
88
|
+
get toDoLists(): ToDoListEntityModel[] | undefined;
|
|
89
|
+
get projects(): ProjectEntityModel[] | undefined;
|
|
90
|
+
get clientAffiliates(): ClientAffiliateEntityModel[] | undefined;
|
|
91
|
+
get clientDebitNoteParticularss(): ClientDebitNoteParticularsEntityModel[] | undefined;
|
|
92
|
+
getNextStatus(currentUser: IUserEntity, action: BankActionEnum, bankFlowConfigContextData: IBankFlowConfigContextData): BankStatusEnum;
|
|
93
|
+
getAvailableActions(currentUser: UserEntityModel, config?: {
|
|
94
|
+
combinedActions?: Record<string, {
|
|
95
|
+
combineActions: BankActionEnum[];
|
|
96
|
+
label: string;
|
|
97
|
+
}>;
|
|
98
|
+
customLabels?: Partial<Record<BankActionEnum, string>>;
|
|
99
|
+
}): IRowActions<EntityEnum.BANK>[];
|
|
100
|
+
getUpdateActionVisibility(currentUser: UserEntityModel): {
|
|
101
|
+
[key: string]: () => boolean;
|
|
102
|
+
};
|
|
24
103
|
get intermediaryBankModel(): IntermediaryBankEntityModel[];
|
|
25
104
|
getPaymentContactEmails(): string[];
|
|
26
105
|
}
|
|
@@ -1,34 +1,448 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BankEntityModel = void 0;
|
|
4
|
-
const
|
|
4
|
+
const error_key_enum_1 = require("../../enums/error.key.enum");
|
|
5
|
+
const exceptions_1 = require("../../exceptions");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
5
8
|
const base_entity_model_1 = require("./base.entity.model");
|
|
9
|
+
const entities_1 = require("../../entities");
|
|
10
|
+
const bank_status_enum_1 = require("../enums/bank_status_enum");
|
|
11
|
+
const bank_flow_config_1 = require("../flow-configs/bank_flow.config");
|
|
6
12
|
class BankEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
7
13
|
constructor() {
|
|
8
14
|
super(...arguments);
|
|
9
15
|
this.id = 0;
|
|
10
16
|
this.accountName = "";
|
|
11
|
-
this.organizationId = 0;
|
|
12
17
|
this.name = "";
|
|
13
18
|
this.accountNo = "";
|
|
14
19
|
this.branchAddress = "";
|
|
15
20
|
this.ifscCode = "";
|
|
16
21
|
this.emailForPaymentInfoCsv = "";
|
|
17
|
-
this.status =
|
|
18
|
-
this.createdBy = 0;
|
|
19
|
-
this.updatedBy = 0;
|
|
22
|
+
this.status = bank_status_enum_1.BankStatusEnum.CREATE_APPROVAL_PENDING;
|
|
20
23
|
this.createdOn = 0;
|
|
21
24
|
this.updatedOn = 0;
|
|
22
|
-
this.
|
|
25
|
+
this.createdBy = 0;
|
|
26
|
+
this.updatedBy = 0;
|
|
23
27
|
}
|
|
24
28
|
static fromEntity(entity) {
|
|
25
|
-
const result = new BankEntityModel(
|
|
29
|
+
const result = new BankEntityModel(entity_utils_interface_1.EntityEnum.BANK);
|
|
26
30
|
Object.assign(result, entity);
|
|
27
31
|
return result;
|
|
28
32
|
}
|
|
29
33
|
getRelationConfigs() {
|
|
30
34
|
return this.constructor.prototype.constructor.relationConfigs || [];
|
|
31
35
|
}
|
|
36
|
+
get tdsRates() {
|
|
37
|
+
// many_to_many -> many_to_many verified
|
|
38
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one'}
|
|
39
|
+
// ['bank', 'vendor_tds_challan'] -> one_to_many
|
|
40
|
+
// ['vendor_tds_challan', 'tds_rate'] -> many_to_one
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = this.vendorTdsChallans) === null || _a === void 0 ? void 0 : _a.flatMap((vendorTdsChallan) => vendorTdsChallan.tdsRate).filter((tdsRate) => !!tdsRate).reduce((accumulator, current) => {
|
|
43
|
+
if (!accumulator.some((tdsRate) => tdsRate.id === current.id)) {
|
|
44
|
+
accumulator.push(current);
|
|
45
|
+
}
|
|
46
|
+
return accumulator;
|
|
47
|
+
}, []);
|
|
48
|
+
}
|
|
49
|
+
get organizationTypes() {
|
|
50
|
+
// many_to_many -> many_to_many verified
|
|
51
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many'}
|
|
52
|
+
// ['vendor_tds_challan', 'tds_rate'] -> many_to_one
|
|
53
|
+
// ['tds_rate', 'organization_type'] -> many_to_many
|
|
54
|
+
var _a;
|
|
55
|
+
return (_a = this.tdsRates) === null || _a === void 0 ? void 0 : _a.flatMap((tdsRate) => tdsRate.organizationTypes).filter((organizationType) => !!organizationType).reduce((accumulator, current) => {
|
|
56
|
+
if (!accumulator.some((organizationType) => organizationType.id === current.id)) {
|
|
57
|
+
accumulator.push(current);
|
|
58
|
+
}
|
|
59
|
+
return accumulator;
|
|
60
|
+
}, []);
|
|
61
|
+
}
|
|
62
|
+
get vendors() {
|
|
63
|
+
// many_to_many -> many_to_many verified
|
|
64
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many'}
|
|
65
|
+
// ['tds_rate', 'organization_type'] -> many_to_many
|
|
66
|
+
// ['organization_type', 'vendor'] -> one_to_many
|
|
67
|
+
var _a;
|
|
68
|
+
return (_a = this.organizationTypes) === null || _a === void 0 ? void 0 : _a.flatMap((organizationType) => organizationType.vendors).filter((vendor) => !!vendor).reduce((accumulator, current) => {
|
|
69
|
+
if (!accumulator.some((vendor) => vendor.id === current.id)) {
|
|
70
|
+
accumulator.push(current);
|
|
71
|
+
}
|
|
72
|
+
return accumulator;
|
|
73
|
+
}, []);
|
|
74
|
+
}
|
|
75
|
+
get states() {
|
|
76
|
+
// many_to_many -> many_to_many verified
|
|
77
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->state': 'many_to_one'}
|
|
78
|
+
// ['organization_type', 'vendor'] -> one_to_many
|
|
79
|
+
// ['vendor', 'state'] -> many_to_one
|
|
80
|
+
var _a;
|
|
81
|
+
return (_a = this.vendors) === null || _a === void 0 ? void 0 : _a.flatMap((vendor) => vendor.stateModel).filter((state) => !!state).reduce((accumulator, current) => {
|
|
82
|
+
if (!accumulator.some((state) => state.id === current.id)) {
|
|
83
|
+
accumulator.push(current);
|
|
84
|
+
}
|
|
85
|
+
return accumulator;
|
|
86
|
+
}, []);
|
|
87
|
+
}
|
|
88
|
+
get countrys() {
|
|
89
|
+
// many_to_many -> many_to_many verified
|
|
90
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->country': 'many_to_one'}
|
|
91
|
+
// ['organization_type', 'vendor'] -> one_to_many
|
|
92
|
+
// ['vendor', 'country'] -> many_to_one
|
|
93
|
+
var _a;
|
|
94
|
+
return (_a = this.vendors) === null || _a === void 0 ? void 0 : _a.flatMap((vendor) => vendor.countryModel).filter((country) => !!country).reduce((accumulator, current) => {
|
|
95
|
+
if (!accumulator.some((country) => country.id === current.id)) {
|
|
96
|
+
accumulator.push(current);
|
|
97
|
+
}
|
|
98
|
+
return accumulator;
|
|
99
|
+
}, []);
|
|
100
|
+
}
|
|
101
|
+
get officeLocations() {
|
|
102
|
+
// many_to_many -> many_to_many verified
|
|
103
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many', 'vendor_invoice->office_location': 'many_to_one'}
|
|
104
|
+
// ['vendor', 'vendor_invoice'] -> one_to_many
|
|
105
|
+
// ['vendor_invoice', 'office_location'] -> many_to_one
|
|
106
|
+
var _a;
|
|
107
|
+
return (_a = this.vendorInvoices) === null || _a === void 0 ? void 0 : _a.flatMap((vendorInvoice) => vendorInvoice.officeLocation).filter((officeLocation) => !!officeLocation).reduce((accumulator, current) => {
|
|
108
|
+
if (!accumulator.some((officeLocation) => officeLocation.id === current.id)) {
|
|
109
|
+
accumulator.push(current);
|
|
110
|
+
}
|
|
111
|
+
return accumulator;
|
|
112
|
+
}, []);
|
|
113
|
+
}
|
|
114
|
+
get vendorInvoices() {
|
|
115
|
+
// one_to_many -> many_to_many mismatch
|
|
116
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many'}
|
|
117
|
+
// ['organization_type', 'vendor'] -> one_to_many
|
|
118
|
+
// ['vendor', 'vendor_invoice'] -> one_to_many
|
|
119
|
+
// return this.vendors
|
|
120
|
+
// ?.flatMap((vendor) => vendor.vendorInvoice)
|
|
121
|
+
// .filter((vendorInvoice): vendorInvoice is VendorInvoiceEntityModel => !!vendorInvoice)
|
|
122
|
+
// .reduce((accumulator: VendorInvoiceEntityModel[], current) => {
|
|
123
|
+
// if (!accumulator.some((vendorInvoice) => vendorInvoice.id === current.id)) {
|
|
124
|
+
// accumulator.push(current);
|
|
125
|
+
// }
|
|
126
|
+
// return accumulator;
|
|
127
|
+
// }, []);
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
get vendorInvoiceItems() {
|
|
131
|
+
// one_to_many -> many_to_many mismatch
|
|
132
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many', 'vendor_invoice->vendor_invoice_item': 'one_to_many'}
|
|
133
|
+
// ['vendor', 'vendor_invoice'] -> one_to_many
|
|
134
|
+
// ['vendor_invoice', 'vendor_invoice_item'] -> one_to_many
|
|
135
|
+
// return this.vendorInvoices
|
|
136
|
+
// ?.flatMap((vendorInvoice) => vendorInvoice.vendorInvoiceItem)
|
|
137
|
+
// .filter((vendorInvoiceItem): vendorInvoiceItem is VendorInvoiceItemEntityModel => !!vendorInvoiceItem)
|
|
138
|
+
// .reduce((accumulator: VendorInvoiceItemEntityModel[], current) => {
|
|
139
|
+
// if (!accumulator.some((vendorInvoiceItem) => vendorInvoiceItem.id === current.id)) {
|
|
140
|
+
// accumulator.push(current);
|
|
141
|
+
// }
|
|
142
|
+
// return accumulator;
|
|
143
|
+
// }, []);
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
get voucherTypes() {
|
|
147
|
+
// many_to_many -> many_to_many verified
|
|
148
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->voucher_type': 'many_to_many'}
|
|
149
|
+
// ['vendor_tds_challan', 'tds_rate'] -> many_to_one
|
|
150
|
+
// ['tds_rate', 'voucher_type'] -> many_to_many
|
|
151
|
+
var _a;
|
|
152
|
+
return (_a = this.tdsRates) === null || _a === void 0 ? void 0 : _a.flatMap((tdsRate) => tdsRate.voucherTypes).filter((voucherType) => !!voucherType).reduce((accumulator, current) => {
|
|
153
|
+
if (!accumulator.some((voucherType) => voucherType.id === current.id)) {
|
|
154
|
+
accumulator.push(current);
|
|
155
|
+
}
|
|
156
|
+
return accumulator;
|
|
157
|
+
}, []);
|
|
158
|
+
}
|
|
159
|
+
get expenseHeads() {
|
|
160
|
+
// many_to_many -> many_to_many verified
|
|
161
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->voucher_type': 'many_to_many', 'voucher_type->expense_head': 'one_to_many'}
|
|
162
|
+
// ['tds_rate', 'voucher_type'] -> many_to_many
|
|
163
|
+
// ['voucher_type', 'expense_head'] -> one_to_many
|
|
164
|
+
var _a;
|
|
165
|
+
return (_a = this.voucherTypes) === null || _a === void 0 ? void 0 : _a.flatMap((voucherType) => voucherType.expenseHeads).filter((expenseHead) => !!expenseHead).reduce((accumulator, current) => {
|
|
166
|
+
if (!accumulator.some((expenseHead) => expenseHead.id === current.id)) {
|
|
167
|
+
accumulator.push(current);
|
|
168
|
+
}
|
|
169
|
+
return accumulator;
|
|
170
|
+
}, []);
|
|
171
|
+
}
|
|
172
|
+
get gstRates() {
|
|
173
|
+
// many_to_many -> many_to_many verified
|
|
174
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many', 'vendor_invoice->vendor_invoice_item': 'one_to_many', 'vendor_invoice_item->gst_rate': 'many_to_one'}
|
|
175
|
+
// ['vendor_invoice', 'vendor_invoice_item'] -> one_to_many
|
|
176
|
+
// ['vendor_invoice_item', 'gst_rate'] -> many_to_one
|
|
177
|
+
var _a;
|
|
178
|
+
return (_a = this.vendorInvoiceItems) === null || _a === void 0 ? void 0 : _a.flatMap((vendorInvoiceItem) => vendorInvoiceItem.gstRate).filter((gstRate) => !!gstRate).reduce((accumulator, current) => {
|
|
179
|
+
if (!accumulator.some((gstRate) => gstRate.id === current.id)) {
|
|
180
|
+
accumulator.push(current);
|
|
181
|
+
}
|
|
182
|
+
return accumulator;
|
|
183
|
+
}, []);
|
|
184
|
+
}
|
|
185
|
+
get vendorAdvances() {
|
|
186
|
+
// many_to_many -> many_to_many verified
|
|
187
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->vendor_advance': 'one_to_many'}
|
|
188
|
+
// ['vendor_tds_challan', 'tds_rate'] -> many_to_one
|
|
189
|
+
// ['tds_rate', 'vendor_advance'] -> one_to_many
|
|
190
|
+
// return this.tdsRates
|
|
191
|
+
// ?.flatMap((tdsRate) => tdsRate.vendorAdvances)
|
|
192
|
+
// .filter((vendorAdvance): vendorAdvance is VendorAdvanceEntityModel => !!vendorAdvance)
|
|
193
|
+
// .reduce((accumulator: VendorAdvanceEntityModel[], current) => {
|
|
194
|
+
// if (!accumulator.some((vendorAdvance) => vendorAdvance.id === current.id)) {
|
|
195
|
+
// accumulator.push(current);
|
|
196
|
+
// }
|
|
197
|
+
// return accumulator;
|
|
198
|
+
// }, []);
|
|
199
|
+
return undefined;
|
|
200
|
+
}
|
|
201
|
+
get vendorInvoiceAdvances() {
|
|
202
|
+
// one_to_many -> many_to_many mismatch
|
|
203
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice_advance': 'one_to_many'}
|
|
204
|
+
// ['organization_type', 'vendor'] -> one_to_many
|
|
205
|
+
// ['vendor', 'vendor_invoice_advance'] -> one_to_many
|
|
206
|
+
// return this.vendors
|
|
207
|
+
// ?.flatMap((vendor) => vendor.vendorInvoiceAdvance)
|
|
208
|
+
// .filter((vendorInvoiceAdvance): vendorInvoiceAdvance is VendorInvoiceAdvanceEntityModel => !!vendorInvoiceAdvance)
|
|
209
|
+
// .reduce((accumulator: VendorInvoiceAdvanceEntityModel[], current) => {
|
|
210
|
+
// if (!accumulator.some((vendorInvoiceAdvance) => vendorInvoiceAdvance.id === current.id)) {
|
|
211
|
+
// accumulator.push(current);
|
|
212
|
+
// }
|
|
213
|
+
// return accumulator;
|
|
214
|
+
// }, []);
|
|
215
|
+
return undefined;
|
|
216
|
+
}
|
|
217
|
+
get vendorInvoicePayments() {
|
|
218
|
+
// one_to_many -> many_to_many mismatch
|
|
219
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many', 'vendor_invoice->vendor_invoice_payment': 'one_to_many'}
|
|
220
|
+
// ['vendor', 'vendor_invoice'] -> one_to_many
|
|
221
|
+
// ['vendor_invoice', 'vendor_invoice_payment'] -> one_to_many
|
|
222
|
+
// return this.vendorInvoices
|
|
223
|
+
// ?.flatMap((vendorInvoice) => vendorInvoice.vendorInvoicePayment)
|
|
224
|
+
// .filter((vendorInvoicePayment): vendorInvoicePayment is VendorInvoicePaymentEntityModel => !!vendorInvoicePayment)
|
|
225
|
+
// .reduce((accumulator: VendorInvoicePaymentEntityModel[], current) => {
|
|
226
|
+
// if (!accumulator.some((vendorInvoicePayment) => vendorInvoicePayment.id === current.id)) {
|
|
227
|
+
// accumulator.push(current);
|
|
228
|
+
// }
|
|
229
|
+
// return accumulator;
|
|
230
|
+
// }, []);
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
get organizations() {
|
|
234
|
+
// many_to_one -> many_to_many mismatch
|
|
235
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many', 'vendor_invoice->office_location': 'many_to_one', 'office_location->organization': 'many_to_one'}
|
|
236
|
+
// ['vendor_invoice', 'office_location'] -> many_to_one
|
|
237
|
+
// ['office_location', 'organization'] -> many_to_one
|
|
238
|
+
var _a;
|
|
239
|
+
return (_a = this.officeLocations) === null || _a === void 0 ? void 0 : _a.flatMap((officeLocation) => officeLocation.organization).filter((organization) => !!organization).reduce((accumulator, current) => {
|
|
240
|
+
if (!accumulator.some((organization) => organization.id === current.id)) {
|
|
241
|
+
accumulator.push(current);
|
|
242
|
+
}
|
|
243
|
+
return accumulator;
|
|
244
|
+
}, []);
|
|
245
|
+
}
|
|
246
|
+
get vendorTdsLiabilitys() {
|
|
247
|
+
// many_to_many -> many_to_many verified
|
|
248
|
+
// {'bank->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->tds_rate': 'many_to_one', 'tds_rate->vendor_tds_liability': 'one_to_many'}
|
|
249
|
+
// ['vendor_tds_challan', 'tds_rate'] -> many_to_one
|
|
250
|
+
// ['tds_rate', 'vendor_tds_liability'] -> one_to_many
|
|
251
|
+
var _a;
|
|
252
|
+
return (_a = this.tdsRates) === null || _a === void 0 ? void 0 : _a.flatMap((tdsRate) => tdsRate.vendorTdsLiabilitys).filter((vendorTdsLiability) => !!vendorTdsLiability).reduce((accumulator, current) => {
|
|
253
|
+
if (!accumulator.some((vendorTdsLiability) => vendorTdsLiability.id === current.id)) {
|
|
254
|
+
accumulator.push(current);
|
|
255
|
+
}
|
|
256
|
+
return accumulator;
|
|
257
|
+
}, []);
|
|
258
|
+
}
|
|
259
|
+
get clients() {
|
|
260
|
+
// many_to_many -> many_to_many verified
|
|
261
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client': 'many_to_one'}
|
|
262
|
+
// ['bank', 'client_debit_note'] -> one_to_many
|
|
263
|
+
// ['client_debit_note', 'client'] -> many_to_one
|
|
264
|
+
var _a;
|
|
265
|
+
return (_a = this.clientDebitNotes) === null || _a === void 0 ? void 0 : _a.flatMap((clientDebitNote) => clientDebitNote.client).filter((client) => !!client).reduce((accumulator, current) => {
|
|
266
|
+
if (!accumulator.some((client) => client.id === current.id)) {
|
|
267
|
+
accumulator.push(current);
|
|
268
|
+
}
|
|
269
|
+
return accumulator;
|
|
270
|
+
}, []);
|
|
271
|
+
}
|
|
272
|
+
get users() {
|
|
273
|
+
// many_to_many -> many_to_many verified
|
|
274
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client': 'many_to_one', 'client->user': 'many_to_many'}
|
|
275
|
+
// ['client_debit_note', 'client'] -> many_to_one
|
|
276
|
+
// ['client', 'user'] -> many_to_many
|
|
277
|
+
// return this.clients
|
|
278
|
+
// ?.flatMap((client) => client.users)
|
|
279
|
+
// .filter((user): user is UserEntityModel => !!user)
|
|
280
|
+
// .reduce((accumulator: UserEntityModel[], current) => {
|
|
281
|
+
// if (!accumulator.some((user) => user.id === current.id)) {
|
|
282
|
+
// accumulator.push(current);
|
|
283
|
+
// }
|
|
284
|
+
// return accumulator;
|
|
285
|
+
// }, []);
|
|
286
|
+
return undefined;
|
|
287
|
+
}
|
|
288
|
+
get leaveApprovals() {
|
|
289
|
+
// many_to_many -> many_to_many verified
|
|
290
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client': 'many_to_one', 'client->user': 'many_to_many', 'user->leave_approval': 'one_to_many'}
|
|
291
|
+
// ['client', 'user'] -> many_to_many
|
|
292
|
+
// ['user', 'leave_approval'] -> one_to_many
|
|
293
|
+
// return this.users
|
|
294
|
+
// ?.flatMap((user) => user.leaveApprovals)
|
|
295
|
+
// .filter((leaveApproval): leaveApproval is LeaveApprovalEntityModel => !!leaveApproval)
|
|
296
|
+
// .reduce((accumulator: LeaveApprovalEntityModel[], current) => {
|
|
297
|
+
// if (!accumulator.some((leaveApproval) => leaveApproval.id === current.id)) {
|
|
298
|
+
// accumulator.push(current);
|
|
299
|
+
// }
|
|
300
|
+
// return accumulator;
|
|
301
|
+
// }, []);
|
|
302
|
+
return undefined;
|
|
303
|
+
}
|
|
304
|
+
get leaves() {
|
|
305
|
+
// many_to_many -> many_to_many verified
|
|
306
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client': 'many_to_one', 'client->user': 'many_to_many', 'user->leave_approval': 'one_to_many', 'leave_approval->leave': 'many_to_one'}
|
|
307
|
+
// ['user', 'leave_approval'] -> one_to_many
|
|
308
|
+
// ['leave_approval', 'leave'] -> many_to_one
|
|
309
|
+
var _a;
|
|
310
|
+
return (_a = this.leaveApprovals) === null || _a === void 0 ? void 0 : _a.flatMap((leaveApproval) => leaveApproval.leave).filter((leave) => !!leave).reduce((accumulator, current) => {
|
|
311
|
+
if (!accumulator.some((leave) => leave.id === current.id)) {
|
|
312
|
+
accumulator.push(current);
|
|
313
|
+
}
|
|
314
|
+
return accumulator;
|
|
315
|
+
}, []);
|
|
316
|
+
}
|
|
317
|
+
get workFromHomes() {
|
|
318
|
+
// many_to_many -> many_to_many verified
|
|
319
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client': 'many_to_one', 'client->user': 'many_to_many', 'user->work_from_home': 'one_to_many'}
|
|
320
|
+
// ['client', 'user'] -> many_to_many
|
|
321
|
+
// ['user', 'work_from_home'] -> one_to_many
|
|
322
|
+
// return this.users
|
|
323
|
+
// ?.flatMap((user) => user.workFromHomes)
|
|
324
|
+
// .filter((workFromHome): workFromHome is WorkFromHomeEntityModel => !!workFromHome)
|
|
325
|
+
// .reduce((accumulator: WorkFromHomeEntityModel[], current) => {
|
|
326
|
+
// if (!accumulator.some((workFromHome) => workFromHome.id === current.id)) {
|
|
327
|
+
// accumulator.push(current);
|
|
328
|
+
// }
|
|
329
|
+
// return accumulator;
|
|
330
|
+
// }, []);
|
|
331
|
+
return undefined;
|
|
332
|
+
}
|
|
333
|
+
get toDoLists() {
|
|
334
|
+
// many_to_many -> many_to_many verified
|
|
335
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client': 'many_to_one', 'client->user': 'many_to_many', 'user->to_do_list': 'one_to_many'}
|
|
336
|
+
// ['client', 'user'] -> many_to_many
|
|
337
|
+
// ['user', 'to_do_list'] -> one_to_many
|
|
338
|
+
// return this.users
|
|
339
|
+
// ?.flatMap((user) => user.toDoLists)
|
|
340
|
+
// .filter((toDoList): toDoList is ToDoListEntityModel => !!toDoList)
|
|
341
|
+
// .reduce((accumulator: ToDoListEntityModel[], current) => {
|
|
342
|
+
// if (!accumulator.some((toDoList) => toDoList.id === current.id)) {
|
|
343
|
+
// accumulator.push(current);
|
|
344
|
+
// }
|
|
345
|
+
// return accumulator;
|
|
346
|
+
// }, []);
|
|
347
|
+
return undefined;
|
|
348
|
+
}
|
|
349
|
+
get projects() {
|
|
350
|
+
// many_to_many -> many_to_many verified
|
|
351
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client': 'many_to_one', 'client->user': 'many_to_many', 'user->to_do_list': 'one_to_many', 'to_do_list->project': 'many_to_one'}
|
|
352
|
+
// ['user', 'to_do_list'] -> one_to_many
|
|
353
|
+
// ['to_do_list', 'project'] -> many_to_one
|
|
354
|
+
var _a;
|
|
355
|
+
return (_a = this.toDoLists) === null || _a === void 0 ? void 0 : _a.flatMap((toDoList) => toDoList.project).filter((project) => !!project).reduce((accumulator, current) => {
|
|
356
|
+
if (!accumulator.some((project) => project.id === current.id)) {
|
|
357
|
+
accumulator.push(current);
|
|
358
|
+
}
|
|
359
|
+
return accumulator;
|
|
360
|
+
}, []);
|
|
361
|
+
}
|
|
362
|
+
get clientAffiliates() {
|
|
363
|
+
// many_to_many -> many_to_many verified
|
|
364
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client_affiliate': 'many_to_one'}
|
|
365
|
+
// ['bank', 'client_debit_note'] -> one_to_many
|
|
366
|
+
// ['client_debit_note', 'client_affiliate'] -> many_to_one
|
|
367
|
+
var _a;
|
|
368
|
+
return (_a = this.clientDebitNotes) === null || _a === void 0 ? void 0 : _a.flatMap((clientDebitNote) => clientDebitNote.clientAffiliate).filter((clientAffiliate) => !!clientAffiliate).reduce((accumulator, current) => {
|
|
369
|
+
if (!accumulator.some((clientAffiliate) => clientAffiliate.id === current.id)) {
|
|
370
|
+
accumulator.push(current);
|
|
371
|
+
}
|
|
372
|
+
return accumulator;
|
|
373
|
+
}, []);
|
|
374
|
+
}
|
|
375
|
+
get clientDebitNoteParticularss() {
|
|
376
|
+
// one_to_many -> one_to_many verified
|
|
377
|
+
// {'bank->client_debit_note': 'one_to_many', 'client_debit_note->client_debit_note_particulars': 'one_to_many'}
|
|
378
|
+
// ['bank', 'client_debit_note'] -> one_to_many
|
|
379
|
+
// ['client_debit_note', 'client_debit_note_particulars'] -> one_to_many
|
|
380
|
+
var _a;
|
|
381
|
+
return (_a = this.clientDebitNotes) === null || _a === void 0 ? void 0 : _a.flatMap((clientDebitNote) => clientDebitNote.clientDebitNoteParticularss).filter((clientDebitNoteParticulars) => !!clientDebitNoteParticulars).reduce((accumulator, current) => {
|
|
382
|
+
if (!accumulator.some((clientDebitNoteParticulars) => clientDebitNoteParticulars.id === current.id)) {
|
|
383
|
+
accumulator.push(current);
|
|
384
|
+
}
|
|
385
|
+
return accumulator;
|
|
386
|
+
}, []);
|
|
387
|
+
}
|
|
388
|
+
getNextStatus(currentUser, action, bankFlowConfigContextData) {
|
|
389
|
+
if (!this.status) {
|
|
390
|
+
throw new exceptions_1.AppBadRequestException({
|
|
391
|
+
key: error_key_enum_1.ErrorKeyEnum.STATUS,
|
|
392
|
+
message: [`Status not found: ${this.status}`],
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
const flowForStatus = bank_flow_config_1.bankFlowConfig[this.status];
|
|
396
|
+
if (!flowForStatus) {
|
|
397
|
+
throw new exceptions_1.AppBadRequestException({
|
|
398
|
+
key: error_key_enum_1.ErrorKeyEnum.STATUS,
|
|
399
|
+
message: [`No flow configuration found for status: ${this.status}`],
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
if (!action) {
|
|
403
|
+
throw new exceptions_1.AppBadRequestException({
|
|
404
|
+
key: error_key_enum_1.ErrorKeyEnum.ACTION_DATA,
|
|
405
|
+
message: ["actionData is required"],
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
const matchingPermissionConfig = flowForStatus.actions[action];
|
|
409
|
+
if (!matchingPermissionConfig) {
|
|
410
|
+
throw new exceptions_1.AppBadRequestException({
|
|
411
|
+
key: error_key_enum_1.ErrorKeyEnum.ACTION,
|
|
412
|
+
message: [`Action '${action}' is not valid for the current status.`],
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
if (!currentUser.permissions || currentUser.permissions.length === 0) {
|
|
416
|
+
throw new exceptions_1.AppBadRequestException({
|
|
417
|
+
key: error_key_enum_1.ErrorKeyEnum.PERMISSIONS,
|
|
418
|
+
message: ["Permission not available for currentUser"],
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
const hasPermission = matchingPermissionConfig.permissions.some((permission) => currentUser.permissions.includes(permission));
|
|
422
|
+
if (!hasPermission) {
|
|
423
|
+
throw new exceptions_1.AppBadRequestException({
|
|
424
|
+
key: error_key_enum_1.ErrorKeyEnum.PERMISSION,
|
|
425
|
+
message: [`Current user does not have permission to ${action} bank`],
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
const nextStatus = matchingPermissionConfig.next(bankFlowConfigContextData);
|
|
429
|
+
return nextStatus;
|
|
430
|
+
}
|
|
431
|
+
getAvailableActions(currentUser, config) {
|
|
432
|
+
var _a;
|
|
433
|
+
const params = {
|
|
434
|
+
flowConfig: bank_flow_config_1.bankFlowConfig,
|
|
435
|
+
currentStatus: this.status,
|
|
436
|
+
userPermissions: (_a = currentUser.permissions) !== null && _a !== void 0 ? _a : [],
|
|
437
|
+
visibilityData: this.getUpdateActionVisibility.bind(this, currentUser),
|
|
438
|
+
combinedActions: config === null || config === void 0 ? void 0 : config.combinedActions,
|
|
439
|
+
customLabels: config === null || config === void 0 ? void 0 : config.customLabels,
|
|
440
|
+
};
|
|
441
|
+
return utils_1.EntityActionFlowResolverV2.getAvailableActionsData(params);
|
|
442
|
+
}
|
|
443
|
+
getUpdateActionVisibility(currentUser) {
|
|
444
|
+
return {};
|
|
445
|
+
}
|
|
32
446
|
get intermediaryBankModel() {
|
|
33
447
|
var _a;
|
|
34
448
|
return (_a = this.intermediaryBanks) !== null && _a !== void 0 ? _a : [];
|
|
@@ -44,7 +458,25 @@ class BankEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
44
458
|
exports.BankEntityModel = BankEntityModel;
|
|
45
459
|
BankEntityModel.relationConfigs = [
|
|
46
460
|
{
|
|
47
|
-
name:
|
|
461
|
+
name: entity_utils_interface_1.EntityEnum.VENDOR_TDS_CHALLAN,
|
|
462
|
+
relation: entities_1.RelationType.MANY,
|
|
463
|
+
key: "vendorTdsChallans",
|
|
464
|
+
mapKeyConfig: {
|
|
465
|
+
relationKey: "bankId",
|
|
466
|
+
key: "id",
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
name: entity_utils_interface_1.EntityEnum.CLIENT_DEBIT_NOTE,
|
|
471
|
+
relation: entities_1.RelationType.MANY,
|
|
472
|
+
key: "clientDebitNotes",
|
|
473
|
+
mapKeyConfig: {
|
|
474
|
+
relationKey: "bankId",
|
|
475
|
+
key: "id",
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
name: entity_utils_interface_1.EntityEnum.INTERMEDIARY_BANK,
|
|
48
480
|
relation: entities_1.RelationType.MANY,
|
|
49
481
|
key: "intermediaryBanks",
|
|
50
482
|
mapKeyConfig: {
|
|
@@ -52,4 +484,13 @@ BankEntityModel.relationConfigs = [
|
|
|
52
484
|
key: "id",
|
|
53
485
|
},
|
|
54
486
|
},
|
|
487
|
+
{
|
|
488
|
+
name: entity_utils_interface_1.EntityEnum.BILLING,
|
|
489
|
+
relation: entities_1.RelationType.MANY,
|
|
490
|
+
key: "billings",
|
|
491
|
+
mapKeyConfig: {
|
|
492
|
+
relationKey: "bankId",
|
|
493
|
+
key: "id",
|
|
494
|
+
},
|
|
495
|
+
},
|
|
55
496
|
];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IBillingFlowConfig } from "../../api";
|
|
2
|
-
import { IBillingParticulars } from "../../api/v1";
|
|
1
|
+
import { IBillingFlowConfig, IBillingParticulars } from "../../api";
|
|
3
2
|
import { BillingTemplateTitle } from "../../constants";
|
|
4
3
|
import { CurrencyEnum } from "../../enums";
|
|
5
4
|
import { IDtoValidationError, Result } from "../../misc";
|
|
@@ -150,18 +150,7 @@ class EntityHistoryEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
150
150
|
[entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_ADVANCE]: (0, constants_1.getDefaultHistoryKeysToExclude)(),
|
|
151
151
|
[entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_PAYMENT]: (0, constants_1.getDefaultHistoryKeysToExclude)(),
|
|
152
152
|
// Core entities
|
|
153
|
-
|
|
154
|
-
// constraint-search has no entity-scoped read check (audit user 11.d)
|
|
155
|
-
[entity_utils_interface_1.EntityEnum.USER]: [
|
|
156
|
-
...(0, constants_1.getDefaultHistoryKeysToExclude)(),
|
|
157
|
-
"password",
|
|
158
|
-
"panNo",
|
|
159
|
-
"aadharNo",
|
|
160
|
-
"panDocument",
|
|
161
|
-
"aadharDocument",
|
|
162
|
-
"passportDocument",
|
|
163
|
-
"academicQualificationDocument",
|
|
164
|
-
],
|
|
153
|
+
[entity_utils_interface_1.EntityEnum.USER]: (0, constants_1.getDefaultHistoryKeysToExclude)(),
|
|
165
154
|
[entity_utils_interface_1.EntityEnum.PROJECT]: (0, constants_1.getDefaultHistoryKeysToExclude)(),
|
|
166
155
|
[entity_utils_interface_1.EntityEnum.CLIENT]: (0, constants_1.getDefaultHistoryKeysToExclude)(),
|
|
167
156
|
[entity_utils_interface_1.EntityEnum.ORGANIZATION]: (0, constants_1.getDefaultHistoryKeysToExclude)(),
|