1.0.57 • Published 3 years ago

@lestetelecom/showrelatorio v1.0.57

Weekly downloads
17
License
MIT
Repository
-
Last release
3 years ago

Relatorios Props

PropsRequiredDefault valuetypeNote
customColumnsyesnoneArrayArray de objetos.
datayesnoneArrayArray de objetos.
noFiltersnofalsebooleanrender/no render filter row.
renderGraphBtnnotruebooleanrender/no render graph and graph button.
rowHeightno60numberheight of grid rows ( only numbers, not dynamic).
tableHeightno400number or stringTable Container height.
noBottomTotalnofalsebooleanrender/no render total in bottom of the table.
tableTypenotablestringrender a responsive table or a grid whith overflow x and y.
noFilterIconnofalseboolrender/no render filter icons.
noPapernotruebooldisplay border and boz shadow around table.
noDataMessagenoSem relatorio, contate o administrador do sistema.string or React Componentdisplay message when data.length == 0

Exemplos

customColumns: [
  {
    dataKey: 'nome_cli',
    label: 'Nome do Cliente',
    type: 'string'
  }
]

data: [
  {
    nome_cli: 'clodoaldo alves',
    idade: 20,
    data_nasc: '2020-06-04',
    ...
  }
]

<ShowRelatorio customColumns={customColumns} data={data} rowHeight={50}/>

customColumns Props

PropsRequiredDefault valuetypeNote
dataKeyyesnoneobjectobject key.
labelyesnoneobjectColumn label.
typenostringenumobject type: string, bool, number, date...
dateTypenononeenum'dd/mm/yyyy', 'yyyy-mm-dd', 'iso'. (to prevent date format erros), all dates are formated in momen(date).format(date or date time + dateType).
inputFilterSelectnononearrayrender a select input over a text input. value, label pair for render data.
rendernononefuncfunc for custom rendering, receive {row, KEY}.
renderGraphnotruebooleanrender/no render graph for the column.
noFilternofalsebooleanrender/no render filter input for the column.
noSortnofalsebooleanremove Sort function and icon.
widthno200numbercolumn width.

Exemplos

customColumns: [
  {
    dataKey: 'hora_ligacao',
    label: 'Hora da ligação',
    type: 'datetime',
    dateType: 'iso',
    renderGraph: false,
    width: 220,
  },
  {
    dataKey: 'gender',
    label: 'Gênero',
    width: 150,
    //render exemple
    render: ({ row, KEY }) => <div>
      {row[KEY] == 'm' ? 'Male' : 'Female'}
    </div>
  },
  {
    dataKey: 'periodo',
    label: 'Período',
    //inputFilterSelect example
    inputFilterSelect: [
      { value: 'Tarde', label: 'Tarde label' },
      { value: 'Manhã', label: 'Manhã label' },
    ],
    renderGraph: true,
    width: 180,
  },
  {
    ...
  }
]
1.0.55

3 years ago

1.0.54

3 years ago

1.0.57

3 years ago

1.0.56

3 years ago

1.0.53

3 years ago

1.0.44

3 years ago

1.0.43

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.48

3 years ago

1.0.47

3 years ago

1.0.46

3 years ago

1.0.45

3 years ago

1.0.49

3 years ago

1.0.51

3 years ago

1.0.50

3 years ago

1.0.52

3 years ago

1.0.40

3 years ago

1.0.39

3 years ago

1.0.38

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago