Skip to content

Commit

Permalink
Merge pull request #36 from fga-eps-mds/56-termo-baixa
Browse files Browse the repository at this point in the history
#56 feat adiciona termo de baixa
  • Loading branch information
DafneM authored Jun 14, 2023
2 parents efd06df + bcdeff5 commit 3d81b2e
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions src/components/movements-pdf/MovementsPdfDocument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function MovementsPDF({

return (
<Document>
<Page size="A4" style={styles.page}>
<Page size="A4" style={styles.page} orientation="landscape">
<View style={styles.header}>
<Image src="/PoliciaCivilLogo.jpeg" style={styles.logo} />
<Text style={styles.caption}>ESTADO DE GOIÁS</Text>
Expand All @@ -163,29 +163,33 @@ export function MovementsPDF({
<Text style={styles.subtitle}>
Sistema de Controle Interno da DSTI
</Text>
<Text style={styles.locale}>26ª Delegacia de Polícia de Goiânia</Text>
<Text style={styles.locale}>
{title === 'Baixa' ? '' : '26ª Delegacia de Polícia de Goiânia'}
</Text>
</View>
<Text style={styles.caption}>
Data da emissão: {formattedEmissionDate}
</Text>
<View style={styles.tableHeader}>
<Text style={{ ...styles.columnHeader, maxWidth: 24 }}>Item</Text>
<Text style={{ ...styles.columnHeader, maxWidth: 56 }}>
<Text style={{ ...styles.columnHeader, minWidth: 80, maxWidth: 100 }}>
Tombamento
</Text>
<Text style={{ ...styles.columnHeader, maxWidth: 32 }}>Tipo</Text>
<Text style={{ ...styles.columnHeader, minWidth: 60, maxWidth: 80 }}>Tipo</Text>
<Text style={{ ...styles.columnHeader, maxWidth: 40 }}>Marca</Text>
<Text style={styles.columnHeader}>Descrição</Text>
<Text style={styles.columnHeader}>Lotação</Text>
<Text style={styles.columnHeader}>
{title === 'Baixa' ? 'Última Lotação' : 'Lotação'}
</Text>
<Text style={{ ...styles.columnHeader, maxWidth: 56 }}>Data</Text>
</View>
{equipments?.map((equipment, index) => (
<View style={styles.tableRow} key={equipment?.id}>
<Text style={{ ...styles.rowData, maxWidth: 24 }}>{index + 1}</Text>
<Text style={{ ...styles.rowData, maxWidth: 56 }}>
<Text style={{ ...styles.rowData, minWidth: 80, maxWidth: 100 }}>
{equipment?.tippingNumber}
</Text>
<Text style={{ ...styles.rowData, maxWidth: 32 }}>
<Text style={{ ...styles.rowData, minWidth: 60, maxWidth: 80 }}>
{equipment?.type}
</Text>
<Text style={{ ...styles.rowData, maxWidth: 40 }}>
Expand All @@ -205,17 +209,19 @@ export function MovementsPDF({
Qtd. {equipments?.length}
</Text>

<View style={styles.signature}>
<Text style={{ ...styles.caption, marginBottom: 4 }}>
{'_'.repeat(50)}
</Text>
<Text style={styles.caption}>
ASSINATURA / CARIMBO DO TITULAR DA UNIDADE
</Text>
<Text style={styles.caption}>
26ª DELEGACIA DE POLÍCIA DE GOIÂNIA
</Text>
</View>
{title !== 'Baixa' && (
<View style={styles.signature}>
<Text style={{ ...styles.caption, marginBottom: 4 }}>
{'_'.repeat(50)}
</Text>
<Text style={styles.caption}>
ASSINATURA / CARIMBO DO TITULAR DA UNIDADE
</Text>
<Text style={styles.caption}>
26ª DELEGACIA DE POLÍCIA DE GOIÂNIA
</Text>
</View>
)}
</Page>
</Document>
);
Expand Down

0 comments on commit 3d81b2e

Please sign in to comment.