choices:{"id_vacancytype":null,"id_recuperationtype":null,"id_workplan":null},
disablesave: false,
initform: function(){
- periodday.choices["id_workplan"] = new SlimSelect({
- select: "#id_workplan",
- showSearch: false
- });
+
let tfields = document.getElementsByClassName("timefield");
for (let i=0;i<tfields.length;i++){
if (tfields[i].id == "vacancyhours" || tfields[i].id == "recuperationhours" || tfields[i].id == "workhours"){
choices:{"id_vacancytype":null,"id_recuperationtype":null,"id_workplan":null},
disablesave: false,
initform: function(){
+ staffperiodweeks.choices["id_workplan"] = new SlimSelect({
+ select: "#id_workplan",
+ showSearch: false
+ });
//staffperiodweeks.getdefaultdaylimits();
staffperiodweeks.getwptemplates();
document.getElementById("keepvacancy").setAttribute("checked",true);
}
},
getwptemplates: function(){
- postData("db.php",{"get":"workplanlist","schemata":schemata}).then(data => {
+ postData("db.php",{"cl":"Workplan","fn":"getWorkplans","schema":schemata}).then(data => {
dataform.fillselectlist(staffperiodweeks.choices["id_workplan"],data.result.data,'id','dspworkplandetail');
}).catch(e => {console.log(e)});