mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
Merge branch 'feature-25999/C4_cleanup' of github.com:FH-Complete/FHC-Core into feature-25999/C4_cleanup
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
export default {
|
||||
updatePersonUnrulyStatus(person_id, unrulyParam) {
|
||||
|
||||
try {
|
||||
const payload = {person_id, unruly: unrulyParam}
|
||||
const url = '/api/frontend/v1/checkperson/CheckPerson/updatePersonUnrulyStatus';
|
||||
return this.$fhcApi.post(url, payload, null);
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
},
|
||||
filterPerson(payload, base = ''){
|
||||
|
||||
try {
|
||||
const url = base + '/api/frontend/v1/checkperson/CheckPerson/filterPerson';
|
||||
return axios.post(url, payload)
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import bookmark from "./bookmark.js";
|
||||
import stv from "./stv.js";
|
||||
import notiz from "./notiz.js";
|
||||
import betriebsmittel from "./betriebsmittel.js";
|
||||
import checkperson from "./checkperson.js";
|
||||
import ampeln from "./ampeln.js";
|
||||
import ort from "./ort.js";
|
||||
import cms from "./cms.js";
|
||||
@@ -46,9 +47,10 @@ export default {
|
||||
stv,
|
||||
notiz,
|
||||
betriebsmittel,
|
||||
checkperson,
|
||||
ampeln,
|
||||
ort,
|
||||
cms,
|
||||
lehre,
|
||||
addons,
|
||||
addons
|
||||
};
|
||||
|
||||
@@ -55,4 +55,4 @@ export default {
|
||||
</component>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,7 @@ export default {
|
||||
this.formData.grund
|
||||
)
|
||||
.then(result => {
|
||||
|
||||
if (result.data === true)
|
||||
document.location += "";
|
||||
|
||||
@@ -259,4 +260,4 @@ export default {
|
||||
</template>
|
||||
</core-fetch-cmpt>
|
||||
</div>`
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,8 @@ export default {
|
||||
saving: false,
|
||||
formData: {
|
||||
grund: ''
|
||||
}
|
||||
},
|
||||
unrulyInternal: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -77,6 +78,16 @@ export default {
|
||||
this.formData.grund
|
||||
)
|
||||
.then(result => {
|
||||
|
||||
if(this.unrulyInternal) {
|
||||
this.$fhcApi.factory.checkperson.updatePersonUnrulyStatus(this.data.person_id, true).then(
|
||||
(res)=> {
|
||||
if(res?.meta?.status === "success") {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('studierendenantrag', 'antrag_unruly_updated'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (result.data === true)
|
||||
document.location += "";
|
||||
|
||||
@@ -106,11 +117,16 @@ export default {
|
||||
this.formData.grund = event.target.value
|
||||
? this.$p.t('studierendenantrag', event.target.value)
|
||||
: '';
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.uuid = _uuid++;
|
||||
},
|
||||
watch: {
|
||||
'formData.grund'(newVal) {
|
||||
this.unrulyInternal = (newVal === this.$p.t('studierendenantrag', 'textLong_unruly'))
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="studierendenantrag-form-abmeldung">
|
||||
<core-fetch-cmpt :api-function="load">
|
||||
@@ -172,7 +188,11 @@ export default {
|
||||
<option value="textLong_plageat">{{$p.t('studierendenantrag', 'dropdown_plageat')}}
|
||||
</option>
|
||||
<option value="textLong_MissingZgv">{{$p.t('studierendenantrag', 'dropdown_MissingZgv')}}
|
||||
</option>
|
||||
</option>
|
||||
<!--
|
||||
<option value="textLong_unruly">{{$p.t('studierendenantrag', 'dropdown_unruly')}}
|
||||
</option>
|
||||
-->
|
||||
</select>
|
||||
</div>
|
||||
<form-input
|
||||
|
||||
@@ -485,4 +485,4 @@ export default {
|
||||
</lv-popup>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
}
|
||||
@@ -847,4 +847,4 @@ var InfocenterDetails = {
|
||||
{
|
||||
return elementid.substr(elementid.indexOf("_") + 1);
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
$(document).ready(function ()
|
||||
{
|
||||
if(viewData?.checkPerson?.unruly?.length) {
|
||||
const unruly = document.getElementById('unruly')
|
||||
unruly.setAttribute('style', 'display: block;')
|
||||
}
|
||||
|
||||
if(viewData?.checkPerson?.duplicate?.length) {
|
||||
const duplicate = document.getElementById('duplicate')
|
||||
duplicate.setAttribute('style', 'display: block;')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var PersonCheck = {
|
||||
update: function(data)
|
||||
{
|
||||
// format date according to db
|
||||
if(data.gebdatum) {
|
||||
const [day, month, year] = data.gebdatum.split('.');
|
||||
data.gebdatum = year + '-' + month + '-' + day
|
||||
}
|
||||
|
||||
FHC_AjaxClient.ajaxCallPost(
|
||||
'api/frontend/v1/checkperson/CheckPerson/checkUnruly',
|
||||
data,
|
||||
{
|
||||
successCallback: function(response, textStatus, jqXHR) {
|
||||
if (response?.meta?.status === 'success')
|
||||
{
|
||||
PersonCheck._updatedUnruly(response);
|
||||
}
|
||||
else
|
||||
{
|
||||
FHC_DialogLib.alertError('unruly error');
|
||||
}
|
||||
},
|
||||
errorCallback: function() {
|
||||
FHC_DialogLib.alertWarning("Fehler beim Speichern!");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
|
||||
_updatedUnruly: function(response)
|
||||
{
|
||||
const unruly = document.getElementById('unruly')
|
||||
|
||||
if(response?.data?.retval?.length) {
|
||||
viewData.checkPerson.unruly = response?.data?.retval
|
||||
|
||||
// replace existing elements
|
||||
const unrulylist = document.getElementById('unrulylist')
|
||||
const newUnrulyPeople = []
|
||||
viewData.checkPerson.unruly.forEach(u => {
|
||||
newUnrulyPeople.push(document.createTextNode("Person ID: " + u.person_id))
|
||||
newUnrulyPeople.push(document.createElement('br'))
|
||||
})
|
||||
unrulylist.replaceChildren(...newUnrulyPeople)
|
||||
|
||||
// and show it all
|
||||
unruly.setAttribute('style', 'display: block;')
|
||||
} else {
|
||||
// just hide everything
|
||||
unruly.setAttribute('style', 'display: none;')
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
@@ -14,6 +14,7 @@ $(document).ready(function ()
|
||||
|
||||
$('.saveStammdaten').click(function()
|
||||
{
|
||||
|
||||
var kontakt = [];
|
||||
$('.kontakt_input').each(function(){
|
||||
kontakt.push({
|
||||
@@ -62,15 +63,16 @@ var Stammdaten = {
|
||||
CALLED_PATH + "/updateStammdaten/",
|
||||
data,
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
if (FHC_AjaxClient.isSuccess(data))
|
||||
successCallback: function(response, textStatus, jqXHR) {
|
||||
if (FHC_AjaxClient.isSuccess(response))
|
||||
{
|
||||
FHC_DialogLib.alertSuccess("Done!");
|
||||
Stammdaten._updated();
|
||||
PersonCheck.update(data)
|
||||
}
|
||||
else
|
||||
{
|
||||
FHC_DialogLib.alertError(FHC_AjaxClient.getError(data));
|
||||
FHC_DialogLib.alertError(FHC_AjaxClient.getError(response));
|
||||
}
|
||||
},
|
||||
errorCallback: function() {
|
||||
@@ -149,6 +151,7 @@ var Stammdaten = {
|
||||
|
||||
_updated: function()
|
||||
{
|
||||
|
||||
$('.kontakt_input').each(function() {
|
||||
var span = $(this).parent('td').children('span');
|
||||
var value = $(this).val();
|
||||
|
||||
Reference in New Issue
Block a user