Skip to content

Commit

Permalink
fix(EMS-3515): index fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zain Kassam committed Jun 26, 2024
1 parent d4016fd commit 0db28db
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
7 changes: 5 additions & 2 deletions src/api/.keystone/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ describe(`api/constants/XLSX-CONFIG - XLSX_ROW_INDEXES - ${APPLICATION.POLICY_TY

const expected = {
...indexes,
BROKER_ADDRESS: indexes.BROKER_ADDRESS + 1,
BROKER_ADDRESS: indexes.BROKER_ADDRESS + 2,
BUYER_ADDRESS: indexes.BUYER_ADDRESS + 1,
LOSS_PAYEE_ADDRESS: indexes.LOSS_PAYEE_ADDRESS + 1,
TITLES: {
...indexes.TITLES,
BUYER: indexes.TITLES.BUYER + 3,
BUYER: indexes.TITLES.BUYER + 1,
DECLARATIONS: indexes.TITLES.DECLARATIONS + 1,
EXPORT_CONTRACT: indexes.TITLES.EXPORT_CONTRACT + 1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ describe(`api/constants/XLSX-CONFIG - XLSX_ROW_INDEXES - ${APPLICATION.POLICY_TY

const expected = {
...indexes,
BROKER_ADDRESS: indexes.BROKER_ADDRESS + 1,
BROKER_ADDRESS: indexes.BROKER_ADDRESS + 2,
BUYER_ADDRESS: indexes.BUYER_ADDRESS + 1,
LOSS_PAYEE_ADDRESS: indexes.LOSS_PAYEE_ADDRESS + 1,
TITLES: {
...indexes.TITLES,
BUYER: indexes.TITLES.BUYER + 3,
BUYER: indexes.TITLES.BUYER + 1,
DECLARATIONS: indexes.TITLES.DECLARATIONS + 1,
EXPORT_CONTRACT: indexes.TITLES.EXPORT_CONTRACT + 1,
},
Expand Down
8 changes: 6 additions & 2 deletions src/api/constants/XLSX-CONFIG/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ export const XLSX_ROW_INDEXES = (application: Application): XLSXRowIndexes => {
}

if (needPreCreditPeriodCover) {
indexes.BROKER_ADDRESS += 1;
indexes.BROKER_ADDRESS += 2;
indexes.BUYER_ADDRESS += 1;
indexes.LOSS_PAYEE_ADDRESS += 1;

indexes.TITLES.BUYER += 3;
indexes.TITLES.BUYER += 1;
indexes.TITLES.DECLARATIONS += 1;
indexes.TITLES.EXPORT_CONTRACT += 1;
}
Expand Down Expand Up @@ -174,6 +174,10 @@ export const XLSX_ROW_INDEXES = (application: Application): XLSXRowIndexes => {
indexes.TITLES.DECLARATIONS += 5;
indexes.AGENT_ADDRESS = 75;

if (needPreCreditPeriodCover) {
indexes.AGENT_ADDRESS += 1;
}

if (isMultiplePolicy) {
indexes.AGENT_ADDRESS += 1;

Expand Down

0 comments on commit 0db28db

Please sign in to comment.