Update Tasks

This commit is contained in:
Possible
2024-06-26 07:55:41 +01:00
parent ffe67e8c56
commit a8fe1fea3e
+23 -23
View File
@@ -29,7 +29,7 @@ All this task must be done in 1 day
1. fix the bind issue in src/components/MkdListTable/MkdListTableBindOperations.jsx - all //TO DO 1. fix the bind issue in src/components/MkdListTable/MkdListTableBindOperations.jsx - all //TO DO
For example For example
<!-- { <pre>
edit: { edit: {
show: true, show: true,
// action: (ids) => navigate(`/admin/edit-receipts/${ids[0]}`), // action: (ids) => navigate(`/admin/edit-receipts/${ids[0]}`),
@@ -43,35 +43,35 @@ All this task must be done in 1 day
ifValue: 1, ifValue: 1,
}, },
} }
} --> </pre>
the edit action binds via the bind property to a column "receipt_status" > the edit action binds via the bind property to a column "receipt_status", if the value of receipt_status is 1 then the edit should be hidden, i.e not shown
if the value of receipt_status is 1 then the edit should be hidden, i.e not shown
2. in src/components/MkdListTable/MkdListTableRow.jsx each column has a format it should be rendered in 2. in src/components/MkdListTable/MkdListTableRow.jsx each column has a format it should be rendered in
- "line_items" and "receipt_charges" have the list property `true`, listType: `json|object_array` could be `json|number_array` or `json|string_array` but in this case it is the `json|object_array` - "line_items" and "receipt_charges" have the list property `true`, listType: `json|object_array` could be `json|number_array` or `json|string_array` but in this case it is the `json|object_array`
- using the action which tells you what key in the array of objects you need to work on - write the algorithm in src/utils/utils.jsx - Line 179 using the column format and action in format, which tells you what key in the array of objects you need to work on.
operation is either to `list` all the values and return an array or `add` to add all the values of the key and return the result
- src/utils/utils.jsx - Line 179 > operation is either to `list` all the values and return an array or `add` to add all the values of the key and return the result
<!-- Sample = {
header: "receipt_charges", <pre> Sample Column Format = {
accessor: "receipt_charges", header: "receipt_charges",
isSorted: true, accessor: "receipt_charges",
list: true, isSorted: true,
limit: 6, list: true,
listType: "json|object_array", limit: 6,
action: { listType: "json|object_array",
key: "total_charges", action: {
operation: "add", key: "total_charges",
}, operation: "add",
selected_column: true, },
isSortedDesc: false, selected_column: true,
mappingExist: false, isSortedDesc: false,
mappings: {}, mappingExist: false,
}, --> mappings: {},
},
</pre>
## Login ## Login