* finished date table
* proper selection when creating new date
This commit is contained in:
parent
23bffc4c6e
commit
f32dbd802b
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@ -6,6 +6,7 @@
|
|||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="delegatedBuild" value="true" />
|
<option name="delegatedBuild" value="true" />
|
||||||
<option name="testRunner" value="GRADLE" />
|
<option name="testRunner" value="GRADLE" />
|
||||||
|
<option name="disableWrapperSourceDistributionNotification" value="true" />
|
||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="11" />
|
<option name="gradleJvm" value="11" />
|
||||||
|
@ -5,7 +5,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group 'com.wasteinformationserver'
|
group 'com.wasteinformationserver'
|
||||||
version '0.1-Beta'
|
version '0.2-Beta'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@ public class DataRequest extends PostRequest {
|
|||||||
@Override
|
@Override
|
||||||
public String request(HashMap<String, String> params) {
|
public String request(HashMap<String, String> params) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
ResultSet set = null;
|
||||||
|
int status = -1;
|
||||||
|
|
||||||
JDCB jdcb;
|
JDCB jdcb;
|
||||||
try {
|
try {
|
||||||
@ -33,7 +35,7 @@ public class DataRequest extends PostRequest {
|
|||||||
// check if wastezone and wasteregion already exists
|
// check if wastezone and wasteregion already exists
|
||||||
|
|
||||||
Log.debug(params.get("cityname") + params.get("wastetype") + params.get("wastezone"));
|
Log.debug(params.get("cityname") + params.get("wastetype") + params.get("wastezone"));
|
||||||
ResultSet set = jdcb.executeQuery("select * from `cities` where `name`='" + params.get("cityname") + "' AND `wastetype`='" + params.get("wastetype") + "' AND `zone`='" + params.get("wastezone") + "'");
|
set = jdcb.executeQuery("select * from `cities` where `name`='" + params.get("cityname") + "' AND `wastetype`='" + params.get("wastetype") + "' AND `zone`='" + params.get("wastezone") + "'");
|
||||||
int size = 0;
|
int size = 0;
|
||||||
try {
|
try {
|
||||||
if (set != null) {
|
if (set != null) {
|
||||||
@ -45,8 +47,6 @@ public class DataRequest extends PostRequest {
|
|||||||
}
|
}
|
||||||
if (size == 0) {
|
if (size == 0) {
|
||||||
//doesnt exist
|
//doesnt exist
|
||||||
System.out.println("doesnt exist");
|
|
||||||
int status = 0;
|
|
||||||
try {
|
try {
|
||||||
status = jdcb.executeUpdate("INSERT INTO `cities`(`userid`, `name`, `wastetype`, `zone`) VALUES ('0','" + params.get("cityname") + "','" + params.get("wastetype") + "','" + params.get("wastezone") + "');");
|
status = jdcb.executeUpdate("INSERT INTO `cities`(`userid`, `name`, `wastetype`, `zone`) VALUES ('0','" + params.get("cityname") + "','" + params.get("wastetype") + "','" + params.get("wastezone") + "');");
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
@ -72,16 +72,16 @@ public class DataRequest extends PostRequest {
|
|||||||
sb.append("}");
|
sb.append("}");
|
||||||
break;
|
break;
|
||||||
case "getAllCities":
|
case "getAllCities":
|
||||||
ResultSet sett = jdcb.executeQuery("select * from cities");
|
set = jdcb.executeQuery("select * from cities");
|
||||||
Log.debug(sett.toString());
|
Log.debug(set.toString());
|
||||||
sb.append("{\"data\":[");
|
sb.append("{\"data\":[");
|
||||||
try {
|
try {
|
||||||
while (sett.next()) {
|
while (set.next()) {
|
||||||
sb.append("{\"cityname\":\"" + sett.getString("name") + "\"");
|
sb.append("{\"cityname\":\"" + set.getString("name") + "\"");
|
||||||
sb.append(",\"wastetype\":\"" + sett.getString("wastetype") + "\"");
|
sb.append(",\"wastetype\":\"" + set.getString("wastetype") + "\"");
|
||||||
sb.append(",\"id\":\"" + sett.getString("id") + "\"");
|
sb.append(",\"id\":\"" + set.getString("id") + "\"");
|
||||||
sb.append(",\"zone\":\"" + sett.getString("zone") + "\"}");
|
sb.append(",\"zone\":\"" + set.getString("zone") + "\"}");
|
||||||
if (!sett.isLast()) {
|
if (!set.isLast()) {
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,8 +97,6 @@ public class DataRequest extends PostRequest {
|
|||||||
case "deletecity":
|
case "deletecity":
|
||||||
//DELETE FROM `cities` WHERE `id`=0
|
//DELETE FROM `cities` WHERE `id`=0
|
||||||
sb.append("{");
|
sb.append("{");
|
||||||
Log.debug(params.get("id"));
|
|
||||||
int status = 0;
|
|
||||||
try {
|
try {
|
||||||
status = jdcb.executeUpdate("DELETE FROM `cities` WHERE `id`='" + params.get("id") + "'");
|
status = jdcb.executeUpdate("DELETE FROM `cities` WHERE `id`='" + params.get("id") + "'");
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
@ -120,14 +118,57 @@ public class DataRequest extends PostRequest {
|
|||||||
sb.append(",\"query\":\"ok\"");
|
sb.append(",\"query\":\"ok\"");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
|
|
||||||
|
break;
|
||||||
|
case "getAllDates":
|
||||||
|
set = jdcb.executeQuery("SELECT pickupdates.id,pickupdates.pickupdate,cities.userid,cities.name,cities.wastetype,cities.zone " +
|
||||||
|
"FROM `pickupdates` INNER JOIN `cities` ON pickupdates.citywastezoneid = cities.id");
|
||||||
|
sb.append("{\"data\":[");
|
||||||
|
try {
|
||||||
|
while (set.next()) {
|
||||||
|
sb.append("{\"date\":\"" + set.getString("pickupdate") + "\"");
|
||||||
|
sb.append(",\"cityname\":\"" + set.getString("name") + "\"");
|
||||||
|
sb.append(",\"wastetype\":\"" + set.getString("wastetype") + "\"");
|
||||||
|
sb.append(",\"id\":\"" + set.getString("id") + "\"");
|
||||||
|
sb.append(",\"zone\":\"" + set.getString("zone") + "\"}");
|
||||||
|
if (!set.isLast()) {
|
||||||
|
sb.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
sb.append("]");
|
||||||
|
sb.append(",\"query\":\"ok\"");
|
||||||
|
sb.append("}");
|
||||||
|
break;
|
||||||
|
case "deletedate":
|
||||||
|
sb.append("{");
|
||||||
|
try {
|
||||||
|
status = jdcb.executeUpdate("DELETE FROM `pickupdates` WHERE `id`='" + params.get("id") + "'");
|
||||||
|
if (status == 1) {
|
||||||
|
//success
|
||||||
|
sb.append("\"status\" : \"success\"");
|
||||||
|
} else {
|
||||||
|
sb.append("\"status\" : \"error\"");
|
||||||
|
}
|
||||||
|
} catch (SQLIntegrityConstraintViolationException e) {
|
||||||
|
Log.warning("dependencies of deletion exist");
|
||||||
|
sb.append("\"status\" : \"dependenciesnotdeleted\"");
|
||||||
|
} catch (SQLException e) {
|
||||||
|
Log.error("sql exception: " + e.getMessage());
|
||||||
|
sb.append("\"status\" : \"error\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(",\"query\":\"ok\"");
|
||||||
|
sb.append("}");
|
||||||
break;
|
break;
|
||||||
case "getcollectionnumber": //todo maybe combine all three to one
|
case "getcollectionnumber": //todo maybe combine all three to one
|
||||||
sb.append("{");
|
sb.append("{");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ResultSet settt = jdcb.executeQuery("select * from pickupdates");
|
set = jdcb.executeQuery("select * from pickupdates");
|
||||||
settt.last();
|
set.last();
|
||||||
sb.append("\"collectionnumber\":\"" + settt.getRow() + "\"");
|
sb.append("\"collectionnumber\":\"" + set.getRow() + "\"");
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
Log.error("sql exception: " + e.getMessage());
|
Log.error("sql exception: " + e.getMessage());
|
||||||
sb.append("\"status\" : \"error\"");
|
sb.append("\"status\" : \"error\"");
|
||||||
@ -142,10 +183,12 @@ public class DataRequest extends PostRequest {
|
|||||||
try {
|
try {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
|
date = new Date(date.getTime()+1 * 24 * 60 * 60 * 1000);
|
||||||
|
|
||||||
String time = sdf.format(date);
|
String time = sdf.format(date);
|
||||||
ResultSet settt = jdcb.executeQuery("SELECT * FROM `pickupdates` WHERE `pickupdate` BETWEEN '"+time+"' AND '2222-12-27'");
|
set = jdcb.executeQuery("SELECT * FROM `pickupdates` WHERE `pickupdate` BETWEEN '"+time+"' AND '2222-12-27'");
|
||||||
settt.last();
|
set.last();
|
||||||
sb.append("\"collectionnumber\":\"" + settt.getRow() + "\"");
|
sb.append("\"collectionnumber\":\"" + set.getRow() + "\"");
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
Log.error("sql exception: " + e.getMessage());
|
Log.error("sql exception: " + e.getMessage());
|
||||||
sb.append("\"status\" : \"error\"");
|
sb.append("\"status\" : \"error\"");
|
||||||
@ -161,9 +204,9 @@ public class DataRequest extends PostRequest {
|
|||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
String time = sdf.format(date);
|
String time = sdf.format(date);
|
||||||
ResultSet settt = jdcb.executeQuery("SELECT * FROM `pickupdates` WHERE `pickupdate` BETWEEN '0000-12-27' AND '"+time+"'");
|
set = jdcb.executeQuery("SELECT * FROM `pickupdates` WHERE `pickupdate` BETWEEN '0000-12-27' AND '"+time+"'");
|
||||||
settt.last();
|
set.last();
|
||||||
sb.append("\"collectionnumber\":\"" + settt.getRow() + "\"");
|
sb.append("\"collectionnumber\":\"" + set.getRow() + "\"");
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
Log.error("sql exception: " + e.getMessage());
|
Log.error("sql exception: " + e.getMessage());
|
||||||
sb.append("\"status\" : \"error\"");
|
sb.append("\"status\" : \"error\"");
|
||||||
|
@ -14,6 +14,7 @@ public class NewDateRequest extends PostRequest {
|
|||||||
public String request(HashMap<String, String> params) {
|
public String request(HashMap<String, String> params) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
JDCB jdcb;
|
JDCB jdcb;
|
||||||
|
ResultSet set;
|
||||||
try {
|
try {
|
||||||
jdcb = JDCB.getInstance();
|
jdcb = JDCB.getInstance();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@ -22,21 +23,21 @@ public class NewDateRequest extends PostRequest {
|
|||||||
}
|
}
|
||||||
switch (params.get("action")) {
|
switch (params.get("action")) {
|
||||||
case "getCitynames":
|
case "getCitynames":
|
||||||
ResultSet sett = jdcb.executeQuery("select * from cities");
|
set = jdcb.executeQuery("select * from cities");
|
||||||
Log.debug(sett.toString());
|
Log.debug(set.toString());
|
||||||
sb.append("{\"data\":[");
|
sb.append("{\"data\":[");
|
||||||
try {
|
try {
|
||||||
String prev = "";
|
String prev = "";
|
||||||
while (sett.next()) {
|
while (set.next()) {
|
||||||
if (prev.equals(sett.getString("name"))) {
|
if (prev.equals(set.getString("name"))) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!sett.isFirst()) {
|
if (!set.isFirst()) {
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
}
|
}
|
||||||
sb.append("{\"cityname\":\"" + sett.getString("name") + "\"}");
|
sb.append("{\"cityname\":\"" + set.getString("name") + "\"}");
|
||||||
}
|
}
|
||||||
prev = sett.getString("name");
|
prev = set.getString("name");
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -47,7 +48,7 @@ public class NewDateRequest extends PostRequest {
|
|||||||
Log.debug(sb.toString());
|
Log.debug(sb.toString());
|
||||||
break;
|
break;
|
||||||
case "getzones":
|
case "getzones":
|
||||||
ResultSet set = jdcb.executeQuery("select * from cities WHERE `name`='" + params.get("cityname") + "' ORDER BY zone ASC");
|
set = jdcb.executeQuery("select * from cities WHERE `name`='" + params.get("cityname") + "' ORDER BY zone ASC");
|
||||||
Log.debug(set.toString());
|
Log.debug(set.toString());
|
||||||
sb.append("{\"data\":[");
|
sb.append("{\"data\":[");
|
||||||
try {
|
try {
|
||||||
@ -70,16 +71,40 @@ public class NewDateRequest extends PostRequest {
|
|||||||
sb.append(",\"query\":\"ok\"");
|
sb.append(",\"query\":\"ok\"");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
break;
|
break;
|
||||||
|
case "gettypes":
|
||||||
|
set = jdcb.executeQuery("select * from cities WHERE `name`='" + params.get("cityname") + "' AND `zone`='"+params.get("zonename")+"' ORDER BY zone ASC");
|
||||||
|
Log.debug(set.toString());
|
||||||
|
sb.append("{\"data\":[");
|
||||||
|
try {
|
||||||
|
String prev = "42";
|
||||||
|
while (set.next()) {
|
||||||
|
if (prev == set.getString("wastetype")) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
sb.append("{\"wastetype\":\"" + set.getString("wastetype") + "\"}");
|
||||||
|
if (!set.isLast()) {
|
||||||
|
sb.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
prev = set.getString("wastetype");
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
sb.append("]");
|
||||||
|
sb.append(",\"query\":\"ok\"");
|
||||||
|
sb.append("}");
|
||||||
|
break;
|
||||||
case "newdate":
|
case "newdate":
|
||||||
sb.append("{");
|
sb.append("{");
|
||||||
Log.debug(params);
|
Log.debug(params);
|
||||||
ResultSet seti = jdcb.executeQuery("select * from cities WHERE `name`='" + params.get("cityname") + "' AND `zone`='" + params.get("zone") + "' AND `wastetype`='" + params.get("wastetype") + "'");
|
set = jdcb.executeQuery("select * from cities WHERE `name`='" + params.get("cityname") + "' AND `zone`='" + params.get("zone") + "' AND `wastetype`='" + params.get("wastetype") + "'");
|
||||||
try {
|
try {
|
||||||
seti.last();
|
set.last();
|
||||||
if (seti.getRow() == 1) {
|
if (set.getRow() == 1) {
|
||||||
Log.debug(seti.getInt("id"));
|
Log.debug(set.getInt("id"));
|
||||||
|
|
||||||
int status = jdcb.executeUpdate("INSERT INTO `pickupdates`(`citywastezoneid`, `pickupdate`) VALUES ('" + seti.getInt("id") + "','" + params.get("date") + "')");
|
int status = jdcb.executeUpdate("INSERT INTO `pickupdates`(`citywastezoneid`, `pickupdate`) VALUES ('" + set.getInt("id") + "','" + params.get("date") + "')");
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
sb.append("\"status\" : \"success\"");
|
sb.append("\"status\" : \"success\"");
|
||||||
} else {
|
} else {
|
||||||
|
@ -311,11 +311,7 @@
|
|||||||
data-toggle="dropdown">
|
data-toggle="dropdown">
|
||||||
Select waste type
|
Select waste type
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div id="dropdown-type-drops" class="dropdown-menu">
|
||||||
<a class="dropdown-item-wastetype dropdown-item" href="#">Plastic</a>
|
|
||||||
<a class="dropdown-item-wastetype dropdown-item" href="#">Metal</a>
|
|
||||||
<a class="dropdown-item-wastetype dropdown-item" href="#">Residual waste</a>
|
|
||||||
<a class="dropdown-item-wastetype dropdown-item" href="#">Biowaste</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input id="input-wastetime" style="width: 50px;" class="form-control" id="date"
|
<input id="input-wastetime" style="width: 50px;" class="form-control" id="date"
|
||||||
|
@ -38,6 +38,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
|
|
||||||
var citytable;
|
var citytable;
|
||||||
|
var datetable;
|
||||||
|
|
||||||
function reloadtable() {
|
function reloadtable() {
|
||||||
$.post('/senddata/wastedata', 'action=getAllCities', function (data) {
|
$.post('/senddata/wastedata', 'action=getAllCities', function (data) {
|
||||||
@ -108,14 +109,63 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var DataTable;
|
|
||||||
function reloadDateTable() {
|
function reloadDateTable() {
|
||||||
$.post('/senddata/wastedata', 'action=getAllDates', function (data) {
|
$.post('/senddata/wastedata', 'action=getAllDates', function (data) {
|
||||||
if (DataTable != null) {
|
if (datetable != null) {
|
||||||
DataTable.destroy(); //delete table if already created
|
datetable.destroy(); //delete table if already created
|
||||||
}
|
}
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
//todo
|
if (data.query == "ok") {
|
||||||
|
$('#picupdates-tablebody').html("");
|
||||||
|
$(".delbtndate").off();
|
||||||
|
|
||||||
|
for (var i = 0; i < data.data.length; i++) {
|
||||||
|
$('#picupdates-tablebody').append("<tr>" +
|
||||||
|
"<td>" + data.data[i].cityname + "</td>" +
|
||||||
|
"<td>" + data.data[i].zone + "</td>" +
|
||||||
|
"<td>" + data.data[i].wastetype + "</td>" +
|
||||||
|
"<td>" + data.data[i].date + "</td>" +
|
||||||
|
"<td>" + "<button dataid='" + data.data[i].id + "' type='button' class='delbtndate btn btn-danger'>X</button>" + "</td>" +
|
||||||
|
"</tr>");
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".delbtndate").click(function (event) {
|
||||||
|
var id = event.target.getAttribute("dataid");
|
||||||
|
console.log("clicked btn data " + id);
|
||||||
|
$.post('/senddata/wastedata', 'action=deletedate&id=' + id, function (data) {
|
||||||
|
console.log(data);
|
||||||
|
if (data.status == "success") {
|
||||||
|
Swal.fire({
|
||||||
|
type: "success",
|
||||||
|
title: 'Successfully deleted city!',
|
||||||
|
html: 'This alert closes automatically.',
|
||||||
|
timer: 1000,
|
||||||
|
}).then((result) => {
|
||||||
|
console.log('Popup closed. ')
|
||||||
|
|
||||||
|
});
|
||||||
|
reloadDateTable();
|
||||||
|
} else if (data.status == "dependenciesnotdeleted") {
|
||||||
|
Swal.fire({
|
||||||
|
type: "warning",
|
||||||
|
title: 'This city is a dependency of a date',
|
||||||
|
html: 'Do you want do delete it anyway with all dependencies?',
|
||||||
|
}).then((result) => {
|
||||||
|
console.log('Popup closed. ')
|
||||||
|
|
||||||
|
});
|
||||||
|
//todo set yes no button here
|
||||||
|
}
|
||||||
|
|
||||||
|
}, "json");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
citytable = $("#table-pickupdates").DataTable({
|
||||||
|
"order": [[ 3, "desc" ]]
|
||||||
|
} );
|
||||||
|
|
||||||
|
//todo picupdates-tablebody
|
||||||
},"json");
|
},"json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,9 +273,31 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".dropdown-item-wastetype").click(function (event) {
|
$("#dropdown-type-data").click(function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$("#dropdown-type-data").html($(this).html());
|
|
||||||
|
var dropdata = $("#dropdown-type-drops");
|
||||||
|
dropdata.html("");
|
||||||
|
console.log("clickeeeed");
|
||||||
|
|
||||||
|
$.post('/senddata/newdate', 'action=gettypes&cityname=' + $("#dropdown-city").html()+'&zonename='+$("#dropdown-zone").html(), function (data) {
|
||||||
|
console.log(data);
|
||||||
|
if (data.query == "ok") {
|
||||||
|
for (var i = 0; i < data.data.length; i++) {
|
||||||
|
var type = data.data[i].wastetype;
|
||||||
|
dropdata.append("<a class=\"dropdown-data-typename dropdown-item\" href=\"#\">" + type + "</a>");
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".dropdown-data-typename").off();
|
||||||
|
$(".dropdown-data-typename").click(function (evnt) {
|
||||||
|
evnt.preventDefault();
|
||||||
|
$("#dropdown-type-data").html($(this).html());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -253,6 +325,7 @@ $(document).ready(function () {
|
|||||||
zone.html("Select Zone");
|
zone.html("Select Zone");
|
||||||
wastetype.html("Select waste type");
|
wastetype.html("Select waste type");
|
||||||
date.val("");
|
date.val("");
|
||||||
|
reloadDateTable();
|
||||||
} else if (data.status == "citydoesntexist") {
|
} else if (data.status == "citydoesntexist") {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
|
Loading…
Reference in New Issue
Block a user