Commit 1434ff17 by Billy Larru

[FIX montosPolicias - renderizando columnas ]

parent 5656abe9
...@@ -14,6 +14,9 @@ function getColumns() { ...@@ -14,6 +14,9 @@ function getColumns() {
title: `SEDE`, title: `SEDE`,
data: `sede_descripcion`, data: `sede_descripcion`,
className: `text-center`, className: `text-center`,
render: (data) => {
return `<span class="label label-default">${data}</span>`;
}
}, },
{ {
title: `HORARIO`, title: `HORARIO`,
...@@ -43,12 +46,36 @@ function getColumns() { ...@@ -43,12 +46,36 @@ function getColumns() {
{ {
title: `ROL`, title: `ROL`,
data: `tiporol_descripcion`, data: `tiporol_descripcion`,
className: 'text-center' className: 'text-center',
render: (data) => {
let label = "";
switch (data) {
case "REGULAR":
label = "label bg-slate";
break;
case "AMANECIDA 24H":
label = "label bg-teal";
break;
case "AMANECIDA 12H":
label = "label bg-brown";
break;
}
return `<span class="${label}">${data}</span>`;
}
}, },
{ {
title: `COSTO HORA`, title: `COSTO HORA`,
data: `costo_hora`, data: `costo_hora`,
className: 'text-center' className: 'text-center',
render: (data) => {
let label = "";
if (data > 0) {
label = "text-primary";
}
return `<span class="${label}">${data}0</span>`;
}
}, },
{ {
title: `TIEMPO LABORADO`, title: `TIEMPO LABORADO`,
...@@ -58,12 +85,28 @@ function getColumns() { ...@@ -58,12 +85,28 @@ function getColumns() {
{ {
title: `MONTO`, title: `MONTO`,
data: `monto`, data: `monto`,
className: 'text-center' className: 'text-center',
render: (data) => {
let label = "";
if (data > 0) {
label = "text-primary";
}
return `<span class="${label}">${data}.00</span>`;
}
}, },
{ {
title: `DCTO POR NO MARCAR`, title: `DCTO POR NO MARCAR`,
data: `descuento_no_marco`, data: `descuento_no_marco`,
className: 'text-center' className: 'text-center',
render: (data) => {
let label = "";
if (data > 0) {
label = "text-danger";
}
return `<span class="${label}">${data}.00</span>`;
}
}, },
{ {
title: `TIEMPO EXTRA`, title: `TIEMPO EXTRA`,
...@@ -73,7 +116,15 @@ function getColumns() { ...@@ -73,7 +116,15 @@ function getColumns() {
{ {
title: `MONTO EXTRAS`, title: `MONTO EXTRAS`,
data: `monto_extras`, data: `monto_extras`,
className: 'text-center' className: 'text-center',
render: (data) => {
let label = "";
if (data > 0) {
label = "text-primary";
}
return `<span class="${label}">${data}.00</span>`;
}
}, },
{ {
title: `ESTADO EXTRAS`, title: `ESTADO EXTRAS`,
...@@ -96,7 +147,15 @@ function getColumns() { ...@@ -96,7 +147,15 @@ function getColumns() {
{ {
title: `MONTO TOTAL`, title: `MONTO TOTAL`,
data: `monto_total`, data: `monto_total`,
className: 'text-center' className: 'text-center',
render: (data) => {
let label = "";
if (data > 0) {
label = "text-primary";
}
return `<span class="${label}">${data}.00</span>`;
}
}, },
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment