|
|
|
@ -305,6 +305,18 @@
|
|
|
|
$("#model-form").modal("hide");
|
|
|
|
$("#model-form").modal("hide");
|
|
|
|
$.post(url, data, function (res) {
|
|
|
|
$.post(url, data, function (res) {
|
|
|
|
if (res.status) {
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
if (res.data.room_id) {
|
|
|
|
|
|
|
|
$("#data-table tbody").prepend('<tr data-type="bed">\n' +
|
|
|
|
|
|
|
|
' <td>'+res.data.name+'</td>\n' +
|
|
|
|
|
|
|
|
' <td>'+res.data.room_id+'</td>\n' +
|
|
|
|
|
|
|
|
' <td>'+res.data.project_id+'</td>\n' +
|
|
|
|
|
|
|
|
' <td>'+res.data.building_id+'</td>\n' +
|
|
|
|
|
|
|
|
' <td>'+res.data.area_id+'</td>\n' +
|
|
|
|
|
|
|
|
' <td> </td>\n' +
|
|
|
|
|
|
|
|
' </tr>');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
window.location.reload();
|
|
|
|
window.location.reload();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
alertError(res.msg);
|
|
|
|
alertError(res.msg);
|
|
|
|
|