Skip to content

Commit

Permalink
SBERDOMA-679 display floor and section in pdf ticket view
Browse files Browse the repository at this point in the history
  • Loading branch information
nomerdvadcatpyat committed Jul 8, 2021
1 parent 51c453a commit e13fe53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/condo/pages/ticket/[id]/pdf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ const PdfView = () => {
const NotesMessage = intl.formatMessage({ id: 'pages.condo.ticket.id.Notes' })
const EmergencyMessage = intl.formatMessage({ id: 'Emergency' })
const PaidMessage = intl.formatMessage({ id: 'Paid' }).toLowerCase()
const ShortFlatNumber = intl.formatMessage({ id: 'field.ShortFlatNumber' })
const SectionName = intl.formatMessage({ id: 'pages.condo.property.section.Name' })
const FloorName = intl.formatMessage({ id: 'pages.condo.property.floor.Name' })

const containerRef = useRef(null)

Expand Down Expand Up @@ -120,7 +123,9 @@ const PdfView = () => {
}

const TicketCreationDate = getTicketCreateMessage(intl, ticket)
const ticketAddress = get(ticket, ['property', 'address']) + (ticket.unitName ? (', ' + ticket.unitName) : '')
const ticketAddress = get(ticket, ['property', 'address'])
+ (ticket.sectionName && ticket.floorName ? `, ${SectionName} ${ticket.sectionName}, ${FloorName} ${ticket.floorName}` : '')
+ (ticket.unitName ? `, ${ShortFlatNumber} ${ticket.unitName}` : '')
const isEmergency = get(ticket, 'isEmergency')

return (
Expand Down

0 comments on commit e13fe53

Please sign in to comment.