Skip to content

Commit

Permalink
change the code to show the template based on extensiontype
Browse files Browse the repository at this point in the history
  • Loading branch information
JieunSon96 committed Jul 11, 2024
1 parent a7df65c commit a0e3022
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ export const getExtensiondetails = (requestExtensions:any, type: string) => {
}

export const getExtensionType = (requestExtensions: any) => {
let oipcExtension = getExtensiondetails(requestExtensions, "OIPC");
let pbExtension = getExtensiondetails(requestExtensions, "Public Body");
return pbExtension[0] ? "PB" : oipcExtension[0] ? "OIPC" : "NA";
if (!requestExtensions || requestExtensions.length === 0) {
return "NA";
}

// Get the type of the latest extension
let latestExtension = requestExtensions[0];
return latestExtension["extensiontype"] === "Public Body" ? "PB" : "OIPC";
}

export const getTemplateVariables = (requestDetails: any, requestExtensions:any, responsePackagePdfStitchStatus:any, cfrFeeData:any, templateInfo: any) => {
Expand Down
Loading

0 comments on commit a0e3022

Please sign in to comment.