Skip to content

Commit

Permalink
remove global provisions call, align table headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mgtennant committed Jul 5, 2024
1 parent fc8ec1b commit e393419
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'provision_id',
headerName: 'ID',
headerAlign: 'left',
width: 80,
renderCell: (params) => (
<input
Expand All @@ -196,6 +197,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'type',
headerName: 'Type',
headerAlign: 'left',
editable: true,
type: 'singleSelect',
valueOptions: ['', 'O', 'M', 'B', 'V'],
Expand All @@ -212,6 +214,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'provision_group',
headerName: 'Group',
headerAlign: 'left',
editable: true,
type: 'number',
width: 80,
Expand All @@ -227,6 +230,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'sequence_value',
headerName: 'Seq',
headerAlign: 'left',
editable: true,
type: 'number',
width: 80,
Expand All @@ -242,6 +246,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'max',
headerName: 'Max',
headerAlign: 'left',
type: 'number',
width: 80,
renderCell: (params) => (
Expand All @@ -256,6 +261,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'provision_name',
headerName: 'Provision',
headerAlign: 'left',
width: 400,
renderCell: (params) => (
<input
Expand All @@ -270,6 +276,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'free_text',
headerName: 'Free Text',
headerAlign: 'left',
width: 80,
renderCell: (params) => (
<input
Expand All @@ -284,6 +291,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'category',
headerName: 'Category',
headerAlign: 'left',
width: 120,
renderCell: (params) => (
<input
Expand All @@ -298,6 +306,7 @@ const ManageDocumentProvisionsTable2: React.FC<ManageDocumentProvisionsTable2Pro
{
field: 'associated',
headerName: 'Associated',
headerAlign: 'left',
editable: true,
type: 'boolean',
width: 100,
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/app/content/pages/ManageDocumentsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const ManageDocumentsPage: FC = () => {
const [allDocTypes, setAllDocTypes] = useState<DocType[]>([]);
const [provisionGroups, setProvisionGroups] = useState<ProvisionGroup[]>([]);
const [provisions, setProvisions] = useState<ManageDocTypeProvision[]>([]);
const [globalProvisions, setGlobalProvisions] = useState<Provision[]>([]);
const [selectedGlobalProvision, setSelectedGlobalProvision] = useState<ProvisionInfo | null>(null);
const [showGlobalProvisionModal, setShowGlobalProvisionModal] = useState<boolean>(false);

Expand Down Expand Up @@ -81,9 +80,6 @@ const ManageDocumentsPage: FC = () => {
setProvisionGroups(groupData);
const provisionData = await getManageDocumentTypeProvisions(selectedDocType.id);
setProvisions(provisionData);
const globalProvisions = await getGlobalProvisions();
setGlobalProvisions(globalProvisions);
console.log(globalProvisions);
} else {
setProvisionGroups([]);
setProvisions([]);
Expand Down

0 comments on commit e393419

Please sign in to comment.