Skip to content

Commit c357d39

Browse files
authored
Merge pull request #18 from faithcomesbyhearing/develop
Dev to main: remove date from copyright response
2 parents 7888970 + 92a9e92 commit c357d39

File tree

4 files changed

+3
-47
lines changed

4 files changed

+3
-47
lines changed

.devcontainer/Dockerfile.lambda

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FROM public.ecr.aws/lambda/provided:al2023
22

3-
# Copy in your compiled bootstrap
4-
# COPY bin/bootstrap /var/task/bootstrap
53
COPY bootstrap /var/task/bootstrap
64
# Download and install the RIE and set bootstrap permissions
75
RUN chmod +x /var/task/bootstrap && \

service/copyright/copyright.go

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ type ByOrganizations struct {
6666
// it is an abstract struct to wrap the copyright information
6767
Organizations []OrganizationsForCopyright `json:"organizations"`
6868
// ProductCode is the product code for which the copyright applies.
69-
ProductCode string `json:"productCode"`
70-
CopyrightDate string `json:"copyrightDate"`
71-
Copyright string `json:"copyright"`
69+
ProductCode string `json:"productCode"`
70+
Copyright string `json:"copyright"`
7271
}
7372

7473
type LogoOrganization struct {
@@ -189,7 +188,6 @@ func (m *Manager) GetCopyrightBy(
189188
if err != nil {
190189
// Handle the case where no rows were found
191190
if errors.Is(err, sql.ErrNoRows) {
192-
// Log the debug message and return nil, nil to indicate no copyrights found.
193191
slog.Debug(
194192
"No copyrights found for the provided product codes",
195193
"productCodes", productCodes,
@@ -257,7 +255,6 @@ func (m *Manager) GetCopyrightBy(
257255
entry := ByOrganizations{
258256
OrganizationIDList: row.OrganizationIDList.String,
259257
ProductCode: row.ProductCode,
260-
CopyrightDate: row.CopyrightDate.String,
261258
Copyright: row.Copyright,
262259
Organizations: []OrganizationsForCopyright{},
263260
}
@@ -581,15 +578,9 @@ func placeOrgInfo(pdf *fpdf.Fpdf, opts pdf_service.Options,
581578

582579
organizationName := copyrightOrg.OrganizationName
583580

584-
copyrightDate := copyright.CopyrightDate
585-
if strings.TrimSpace(copyrightDate) == "" {
586-
copyrightDate = "Not provided"
587-
}
588-
589581
headerOrgNameHeight := pdf_service.CalculateOrgInfoHeight(pdf, organizationName, opts.CardWidth, opts.CellHeight)
590582

591583
orgNameLabel := "Org. Name: "
592-
dateLabel := "Copyright Date: "
593584

594585
// Set bold font for labels
595586
pdf.SetFont(opts.FontFamily, opts.FontStyleBold, opts.FontSize)
@@ -598,7 +589,6 @@ func placeOrgInfo(pdf *fpdf.Fpdf, opts pdf_service.Options,
598589
headerHeightFactor = 0.5 // Factor to adjust header height
599590
paddingHeight = 2 // Padding after the header
600591
orgNameLabelWidthFactor = 0.22 // Factor for organization name label width
601-
dateLabelWidthFactor = 0.29 // Factor for copyright date label width
602592
)
603593
// Labels
604594
pdf.SetXY(axisX+opts.CardPadding, currentY)
@@ -609,15 +599,6 @@ func placeOrgInfo(pdf *fpdf.Fpdf, opts pdf_service.Options,
609599
opts.BorderText,
610600
opts.AlignStrLeft,
611601
false)
612-
pdf.SetXY(axisX+opts.CardPadding, currentY+headerOrgNameHeight*headerHeightFactor)
613-
pdf.MultiCell(
614-
opts.CardWidth*dateLabelWidthFactor,
615-
opts.CellHeight*headerHeightFactor,
616-
dateLabel,
617-
opts.BorderText,
618-
opts.AlignStrLeft,
619-
false,
620-
)
621602

622603
// Values - switch back to regular font
623604
pdf.SetFont(opts.FontFamily, opts.FontStyle, opts.FontSize)
@@ -631,19 +612,6 @@ func placeOrgInfo(pdf *fpdf.Fpdf, opts pdf_service.Options,
631612
false,
632613
)
633614

634-
pdf.SetXY(
635-
axisX+opts.CardPadding+(opts.CardWidth*dateLabelWidthFactor),
636-
currentY+headerOrgNameHeight*headerHeightFactor,
637-
)
638-
pdf.MultiCell(
639-
opts.CardWidth*0.23,
640-
opts.CellHeight*headerHeightFactor,
641-
copyrightDate,
642-
opts.BorderText,
643-
opts.AlignStrLeft,
644-
false,
645-
)
646-
647615
// Account for height of drawn text
648616
currentY += opts.CellHeight*headerHeightFactor + headerOrgNameHeight*headerHeightFactor
649617
currentY += paddingHeight // Add padding after the header

sqlc/generated/copyright.sql.go

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlc/queries/licensor/copyright.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
-- name: GetFilesetCopyrights :many
22
SELECT
33
GROUP_CONCAT(DISTINCT bfco.organization_id ORDER BY bfco.organization_id) AS organization_id_list,
4-
bfc.copyright_date,
54
bfc.copyright,
65
bft.description AS product_code
76
FROM bible_fileset_copyrights bfc
@@ -13,7 +12,6 @@ WHERE bft.description IN (sqlc.slice('productCodes'))
1312
AND (bft.name = 'product_code' OR bft.name LIKE 'product_code:%')
1413
GROUP BY
1514
bfc.hash_id,
16-
bfc.copyright_date,
1715
bfc.copyright,
1816
bft.description
1917
ORDER BY bft.description;

0 commit comments

Comments
 (0)