WIP Payroll Commit process.

This commit is contained in:
Patrick Fic
2023-04-25 10:24:26 -07:00
parent ad9868b575
commit 6ca773050f
15 changed files with 350 additions and 59 deletions

View File

@@ -1,5 +1,5 @@
import { EditFilled } from "@ant-design/icons";
import { Button, Card, Space, Table } from "antd";
import { Button, Card, Checkbox, Space, Table } from "antd";
import Dinero from "dinero.js";
import moment from "moment";
import React, { useMemo, useState } from "react";
@@ -62,6 +62,14 @@ export function TimeTicketList({
}, [timetickets]);
const columns = [
{
title: t("timetickets.fields.committed"),
dataIndex: "committed_at",
key: "committed_at",
render: (text, record) => (
<Checkbox disabled checked={record.committed_at} />
),
},
{
title: t("timetickets.fields.date"),
dataIndex: "date",
@@ -236,6 +244,11 @@ export function TimeTicketList({
timeticket: record,
}}
disabled={
HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:editcommitted",
}) &&
HasRbacAccess({
bodyshop,
authLevel: authLevel,
@@ -271,7 +284,6 @@ export function TimeTicketList({
}
<Button
onClick={() => {
setTimeTicketTaskContext();
setTimeTicketTaskContext({
actions: {},
context: { jobid: jobId },