From fa13f46d9cfe95870d69b6cbe9c1290543d9aa2b Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Wed, 1 Apr 2026 13:00:30 -0400 Subject: [PATCH] Include delivery report templates in CI/CD sparse deploy and update label naming --- App/Controllers/Kit/KitController.asp | 16 ++++++++++------ CiCd/Tracking_CICD.ps1 | 4 +++- CiCd/deploy.vbs | 4 +++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/App/Controllers/Kit/KitController.asp b/App/Controllers/Kit/KitController.asp index 1dc22bd..a8dc2cb 100644 --- a/App/Controllers/Kit/KitController.asp +++ b/App/Controllers/Kit/KitController.asp @@ -229,11 +229,12 @@ Class KitController Exit Sub End If - dim labelsFilename : labelsFilename = jCode & "-" & jurisdiction & "_delivery_labels.pdf" + dim labelsBaseName : labelsBaseName = jobNumber & " - " & jurisdiction + dim labelsFilename : labelsFilename = labelsBaseName & "_delivery_labels.pdf" dim packingSlipFilename : packingSlipFilename = jCode & "-" & jurisdiction & "_delivery_packing_slip.pdf" dim labelsFinalPath : labelsFinalPath = exportFolder & "\" & labelsFilename dim packingSlipFinalPath : packingSlipFinalPath = exportFolder & "\" & packingSlipFilename - dim labelsTempPath : labelsTempPath = appPath & "Data\" & jCode & "-" & jurisdiction & "_delivery_labels.tmp.pdf" + dim labelsTempPath : labelsTempPath = appPath & "Data\" & labelsBaseName & "_delivery_labels.tmp.pdf" dim packingSlipTempPath : packingSlipTempPath = appPath & "Data\" & jCode & "-" & jurisdiction & "_delivery_packing_slip.tmp.pdf" If FSO.FileExists(labelsTempPath) Then FSO.DeleteFile labelsTempPath @@ -402,11 +403,14 @@ Class KitController end if - if FSO.FileExists(ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "\" & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "_labels.pdf") then - FSO.DeleteFile(ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "\" & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "_labels.pdf") + dim labelsJobFileName : labelsJobFileName = KitInfo.JobNumber & " - " & JurisdictionInfo.Name & "_labels.pdf" + dim labelsJobTempFileName : labelsJobTempFileName = KitInfo.JobNumber & " - " & JurisdictionInfo.Name & " Labels.pdf" + + if FSO.FileExists(ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "\" & labelsJobFileName) then + FSO.DeleteFile(ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "\" & labelsJobFileName) end if - ReportManager.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "\Data\" & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & " Labels.pdf",1 - FSO.MoveFile Request.ServerVariables("APPL_PHYSICAL_PATH") & "\Data\" & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & " Labels.pdf" , ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "\" & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "_labels.pdf" + ReportManager.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "\Data\" & labelsJobTempFileName,1 + FSO.MoveFile Request.ServerVariables("APPL_PHYSICAL_PATH") & "\Data\" & labelsJobTempFileName , ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "\" & labelsJobFileName End Sub diff --git a/CiCd/Tracking_CICD.ps1 b/CiCd/Tracking_CICD.ps1 index 7848499..cf3a6ce 100644 --- a/CiCd/Tracking_CICD.ps1 +++ b/CiCd/Tracking_CICD.ps1 @@ -401,6 +401,8 @@ function Clone-Repo "App/", "Data/arrow ne.jpg", "Data/Label_Report.rep", + "Data/Delivery_Labels.rep", + "Data/Delivery_PackingSlip.rep", "Data/png-transparent-arrow-arrow-angle-triangle-black-thumbnail.jpg", "Data/purple_envelope_sample_Page_1.jpg", "Data/purple_envelope_sample_Page_2.jpg", @@ -453,4 +455,4 @@ Stop-IISAppRemote Clear-RemoteDirectory Deploy-ZipRemote Start-IISAppRemote -Cleanup \ No newline at end of file +Cleanup diff --git a/CiCd/deploy.vbs b/CiCd/deploy.vbs index fcf748e..f42374b 100644 --- a/CiCd/deploy.vbs +++ b/CiCd/deploy.vbs @@ -89,6 +89,8 @@ Sub CloneRepo objFile.WriteLine("App/") objFile.WriteLine("Data/arrow ne.jpg") objFile.WriteLine("Data/Label_Report.rep") + objFile.WriteLine("Data/Delivery_Labels.rep") + objFile.WriteLine("Data/Delivery_PackingSlip.rep") objFile.WriteLine("Data/png-transparent-arrow-arrow-angle-triangle-black-thumbnail.jpg") objFile.WriteLine("Data/purple_envelope_sample_Page_1.jpg") objFile.WriteLine("Data/purple_envelope_sample_Page_2.jpg") @@ -120,4 +122,4 @@ End Sub 'C:\Windows\System32\inetsrv\appcmd.exe start apppool /apppool.name:tracking 'C:\Windows\System32\inetsrv\appcmd.exe start site /site.name:tracking -'nircmd.exe elevatecmd runassystem \ No newline at end of file +'nircmd.exe elevatecmd runassystem