Draft reordering of object keys
This commit is contained in:
parent
29560c166f
commit
00b5195a1f
BIN
js/.ds.js.swp
BIN
js/.ds.js.swp
Binary file not shown.
8
js/ds.js
8
js/ds.js
@ -5,13 +5,19 @@ const RES_ENDPOINT = '/resources/';
|
||||
/**
|
||||
* @todo Report shapes??
|
||||
*/
|
||||
/*
|
||||
export const OBJECT_ORDER = {
|
||||
"Object Type" : null,
|
||||
"Object ID" : null,
|
||||
"Object Excavation code" : null,
|
||||
"Object Chronology" : null,
|
||||
"Object Era" : null,
|
||||
"Object Geographical Context of Discovery" : null,
|
||||
"Object Description" : null,
|
||||
"Object Conservation State" : null,
|
||||
"Object Dimensions" : null,
|
||||
"Object Material" : null,
|
||||
};
|
||||
/*
|
||||
export const SAMPLE_ORDER = {
|
||||
|
||||
};
|
||||
|
@ -4,19 +4,19 @@ import {
|
||||
BASE_URL,
|
||||
fetchReport,
|
||||
printReport,
|
||||
getImageSrc
|
||||
getImageSrc,
|
||||
OBJECT_ORDER
|
||||
} from "../ds.js";
|
||||
|
||||
document.addEventListener('readystatechange', async () => {
|
||||
const report = await fetchReport(location.search.replace("?id=", ''));
|
||||
const resource = report.resource;
|
||||
const archesJson = await fetchReport(location.search.replace("?id=", ''), 'arches-json');
|
||||
|
||||
// DEBUG
|
||||
const files = getImageSrc(archesJson);
|
||||
|
||||
printReport();
|
||||
|
||||
const resource = Object.assign(OBJECT_ORDER, report.resource);
|
||||
|
||||
let resKeys = Object.keys(resource);
|
||||
// Default value...
|
||||
let resType = 'Object';
|
||||
|
Loading…
Reference in New Issue
Block a user