mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 13:20:43 +00:00
QQQ-21 checkpoint - close-to-working QDynamicForm and process-run
This commit is contained in:
@ -62,18 +62,7 @@ function ViewContents({ id }: Props): JSX.Element {
|
||||
const tableMetaData = await qController.loadTableMetaData(tableName);
|
||||
setTableMetaData(tableMetaData);
|
||||
|
||||
// TODO: make a call to query (just get all for now, and iterate and filter like a caveman) - FIX!
|
||||
const records = await qController.query(tableName, 250);
|
||||
let foundRecord: QRecord;
|
||||
records.forEach((innerRecord) => {
|
||||
const fieldKeys = [...innerRecord.values.keys()];
|
||||
fieldKeys.forEach((key) => {
|
||||
const value = innerRecord.values.get(key);
|
||||
if (key === tableMetaData.primaryKeyField && `${value}` === `${id}`) {
|
||||
foundRecord = innerRecord;
|
||||
}
|
||||
});
|
||||
});
|
||||
const foundRecord = await qController.get(tableName, id);
|
||||
|
||||
nameValues.push(
|
||||
<MDBox key={tableMetaData.primaryKeyField} display="flex" py={1} pr={2}>
|
||||
|
Reference in New Issue
Block a user