Merge branch 'ConstructionConsent/add-new-features' into 'master'
added new features See merge request fronk/thetool!1437
This commit is contained in:
@@ -483,7 +483,7 @@ foreach ($owners as $owner):
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="signature-line mt-4">
|
||||
<div class="signature-line" style="margin-top: 64px">
|
||||
<div class="float-left" style="width: 25%;">Ort, Datum</div>
|
||||
<div class="float-right" style="width: 75%;">
|
||||
Unterschrift mit Geburtsdatum bzw. firmenmäßige Zeichnung des/r Liegenschaftseigentümer(s)
|
||||
|
||||
@@ -1193,40 +1193,19 @@ $pagination_entity_name = "Adressen";
|
||||
}
|
||||
}});
|
||||
|
||||
// do the same for prioritize
|
||||
$("#prioritize").on("change", function() {
|
||||
const reason = prompt("Bitte geben Sie einen Grund für die Priorisierung ein:");
|
||||
// reason must be atleast 3 characters long
|
||||
if (reason != null && reason.length < 3) {
|
||||
notify("error", "Begründung muss mindestens 3 Zeichen lang sein");
|
||||
$(this).prop("checked", false);
|
||||
switcheries.forEach(s => s.setPosition());
|
||||
return;
|
||||
}
|
||||
if (reason != null) {
|
||||
$.post("<?php echo self::getUrl("ConstructionConsentJournal", "save")?>", {
|
||||
consent_id: <?=$item->id?>,
|
||||
text: `Priorisierung wurde ${$(this).prop("checked") ? "aktiviert" : "deaktiviert"} | Begründung: ${reason}`
|
||||
}, function(success) {
|
||||
if (success.status != "OK") {
|
||||
notify("error", "Status konnte nicht gespeichert werden");
|
||||
} else {
|
||||
notify("success", "Status erfolgreich gespeichert");
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
$.get("<?php echo self::getUrl("ConstructionConsent", "prioritize")?>", {
|
||||
consent_id: <?=$item->id?>,
|
||||
checked: $(this).prop("checked") ? 1 : 0
|
||||
}, function(success) {
|
||||
if (success.status != "OK") {
|
||||
notify("error", "Status konnte nicht gespeichert werden");
|
||||
setTimeout(() => {location.reload()}, 150);
|
||||
} else {
|
||||
notify("success", "Status erfolgreich gespeichert");
|
||||
setTimeout(() => {location.reload()}, 150);
|
||||
}
|
||||
}, 'json');
|
||||
$.get("<?php echo self::getUrl("ConstructionConsent", "prioritize")?>", {
|
||||
consent_id: <?=$item->id?>,
|
||||
checked: $(this).prop("checked") ? 1 : 0
|
||||
}, function(success) {
|
||||
if (success.status != "OK") {
|
||||
notify("error", "Status konnte nicht gespeichert werden");
|
||||
setTimeout(() => {location.reload()}, 150);
|
||||
} else {
|
||||
notify("success", "Status erfolgreich gespeichert");
|
||||
setTimeout(() => {location.reload()}, 150);
|
||||
}
|
||||
}, 'json')
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user