class RegVehicle_MOT{ constructor(){ this.name = "regvehicle_mot"; } static GetCustomDestination(data, dest){ return (data.vehicle_id ?? "" != "" ? "regvehicle.view" : "regvehicle.overview"); } static GetCustomDestID(data, destID){ return data.vehicle_id ?? destID; } static allowView(){ return userrights.has("regvehicles.view"); } static allowAddNew(){ return true; } static allowEdit(){ return userrights.has("regvehicles.edit"); } static allowDelete(){ return userrights.has("regvehicles.edit"); } static GetColumns(){ return ["plate","veh_type","veh_model","owner","mot","state","id"] } static CreateCustom(data){ let html = Form.BackEditBtn("regvehicle.view", "",-1, false, data.data.id); html += `
${row.note.replace(/\n/g,"
")}
${System.buildEmployeeName(row.creator)} - ${System.formatTimestamp(row.createddate)}
${getTranslation("passed")}: ${getTranslation(row.passed == 1 ? "yes": "no")}
${getTranslation("new_mot")}: ${System.formatDate(row.new_mot) }
${getTranslation("old_mot")}: ${System.formatDate(row.old_mot) }
${contentHtml}${getTranslation("mot.lights")} | ${getTranslation("mot.brakes_tyres")} | ${getTranslation("mot.windows")} | ${getTranslation("mot.others")} |
---|---|---|---|
${getTranslation("headlights")} | ${getTranslation("front_brakes")} | ${getTranslation("windscreen")} | ${getTranslation("horn")} |
${getTranslation("rear_lights")} | ${getTranslation("rear_brakes")} | ${getTranslation("rear_window")} | ${getTranslation("exhaust_system")} |
${getTranslation("indicators")} | ${getTranslation("front_tyres")} | ${getTranslation("side_windows")} | ${getTranslation("engine")} |
${getTranslation("rear_tyres")} | ${getTranslation("bodywork")} |