Newer
Older
import("./utils.js").then((utils) => {
import(/* @vite-ignore */utils.coreVersion()).then((core) => {
core.Sib.register({
name: "customtzcld-list-territory-regions",
use: [core.StoreMixin],
empty() {
//console.debug();
this.element.innerHTML = "";
},
async populate() {
this.element.innerHTML = `
<div class="loader">
<div></div>
<div></div>
<div></div>
<div></div>
</div>`;
let tzcldprofile = {
regions: await this.resource["ldp:contains"]
};
if("label" in this.element.attributes) {
for(let ignore of this.element.attributes['label'].value.split(',')) {
tzcldprofile[ignore.trim()] = null;
}
}
let render = ``;
if (tzcldprofile.regions && tzcldprofile.regions.length > 0) {
for(let region of tzcldprofile.regions) {
render += `<div class="region segment tag color-fourth margin-top-xxxsmall margin-bottom-xxxsmall">${await region.name}</div>`;
}
this.element.innerHTML = render;
},
});
core.Sib.register({
name: "customtzcld-list-territory-step-state",
use: [core.StoreMixin],
empty() {
//console.debug();
this.element.innerHTML = "";
},
async populate() {
this.element.innerHTML = ``;
let tzcldprofile = {
step_state: await this.resource
};
if("label" in this.element.attributes) {
for(let ignore of this.element.attributes['label'].value.split(',')) {
tzcldprofile[ignore.trim()] = null;
}
}
let render = ``;
render += `<div class="region segment tag color-fourth margin-top-xxxsmall margin-bottom-xxxsmall">
${await tzcldprofile.step_state.name}
</div>`;
}
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
this.element.innerHTML = render;
},
});
core.Sib.register({
name: "customtzcld-list-territory-kind",
use: [core.StoreMixin],
empty() {
//console.debug();
this.element.innerHTML = "";
},
async populate() {
this.element.innerHTML = ``;
let tzcldprofile = {
kind: await this.resource
};
if("label" in this.element.attributes) {
for(let ignore of this.element.attributes['label'].value.split(',')) {
tzcldprofile[ignore.trim()] = null;
}
}
let render = ``;
render += `<div class="region segment tag color-fourth margin-top-xxxsmall margin-bottom-xxxsmall">${await tzcldprofile.kind.name}</div>`;
this.element.innerHTML = render;
},
});
});
});