maj site admin
This commit is contained in:
53
wco/apxprofil/apxprofil.js
Normal file
53
wco/apxprofil/apxprofil.js
Normal file
@@ -0,0 +1,53 @@
|
||||
var apx = apx || {};
|
||||
apx.apxprofil = {};
|
||||
apx.apxprofil.loadwco = async (id, ctx) => {
|
||||
console.log(
|
||||
`Load wconame:apxauth apx.apxauth.loadwco with id:${id} and ctx: ${JSON.stringify(
|
||||
ctx
|
||||
)}`
|
||||
);
|
||||
// Check that in localdb tpl exist if not means it is not authenticated
|
||||
if (!apx.data.tpl[`apxauthscreen${ctx.link}`]) ctx.link="signin";
|
||||
const tpldataname = `${apx.data.pagename}_${id}_apxprofil`;
|
||||
const destid = document.getElementById(id);
|
||||
const data = apx.apxprofil.getdata(id, ctx);
|
||||
if (destid.innerHTML.trim() === "") {
|
||||
destid.innerHTML = Mustache.render(apx.data.tpl.apxprofilmain, data);
|
||||
}
|
||||
destid.querySelector(`.screenaction`).innerHTML = Mustache.render(
|
||||
apx.data.tpl[`apxprofilscreen${ctx.link}`],
|
||||
data
|
||||
);
|
||||
apxauthid.querySelector(`.msginfo`).innerHTML = "";
|
||||
};
|
||||
apx.apxprofil.getdata = (id, ctx) => {
|
||||
const tpldataname = `${apx.data.pagename}_${id}_apxauth`;
|
||||
const data = JSON.parse(JSON.stringify(apx.data.tpldata[tpldataname]));
|
||||
data.id = id;
|
||||
data.xalias = apx.data.headers.xalias;
|
||||
data.xtribe = apx.data.headers.xtribe;
|
||||
|
||||
data.emailsupport = apx.data?.appdata?.emailsupport
|
||||
? apx.data.appdata.emailsupport
|
||||
: "";
|
||||
console.log("data:",data)
|
||||
switch (ctx.link) {
|
||||
case "alias":
|
||||
break;
|
||||
case "unique":
|
||||
break;
|
||||
case "tribes":
|
||||
break;
|
||||
case "towns":
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
console.log("data for tpl:", data);
|
||||
return data;
|
||||
};
|
||||
|
||||
apx.apxprofil.gohome=()=>{
|
||||
window.location.href=`apxid_${apx.data.headers.xlang}.html`;
|
||||
|
||||
}
|
7
wco/apxprofil/main_fr.mustache
Normal file
7
wco/apxprofil/main_fr.mustache
Normal file
@@ -0,0 +1,7 @@
|
||||
<!-- screen action-->
|
||||
<div class="screenaction mt-5 px-7 w-full">
|
||||
</div>
|
||||
<!-- feedback action-->
|
||||
<div class="my-5 w-full">
|
||||
<p class="msginfo text-center text-info"></p>
|
||||
</div>
|
0
wco/apxprofil/screenmyalias_fr.mustache
Normal file
0
wco/apxprofil/screenmyalias_fr.mustache
Normal file
0
wco/apxprofil/screenmypublicdata_fr.mustache
Normal file
0
wco/apxprofil/screenmypublicdata_fr.mustache
Normal file
0
wco/apxprofil/screenmytowns_fr.mustache
Normal file
0
wco/apxprofil/screenmytowns_fr.mustache
Normal file
0
wco/apxprofil/screenmytribes_fr.mustache
Normal file
0
wco/apxprofil/screenmytribes_fr.mustache
Normal file
Reference in New Issue
Block a user