|
|
|
@ -52,11 +52,15 @@ $("#app").on("click", "#package-info-sheet #package-info-get-directions", functi
|
|
|
|
|
window.open($(this).attr("href"), "_system");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function openPackageInfoSheet(package, refreshOnly) {
|
|
|
|
|
function openPackageInfoSheet(coordid, refreshOnly) {
|
|
|
|
|
if (typeof refreshOnly == "undefined") {
|
|
|
|
|
refreshOnly = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < packages.length; i++) {
|
|
|
|
|
if (packages[i].id == coordid) {
|
|
|
|
|
package = packages[i];
|
|
|
|
|
|
|
|
|
|
$("#package-info-get-directions").attr("href", "geo:" + package.coords[0] + "," + package.coords[1]);
|
|
|
|
|
$("#package-info-sheet-inner").html("");
|
|
|
|
|
|
|
|
|
@ -65,7 +69,7 @@ function openPackageInfoSheet(package, refreshOnly) {
|
|
|
|
|
+ '<div class="block margin-top-half">'
|
|
|
|
|
+ ' <div>'
|
|
|
|
|
+ ' <span class="package-info-delivery-status">'
|
|
|
|
|
+ ' ' + + (package.items[i].delivered ? '<span class="text-color-green"><i class="fas fa-check-circle"></i> Delivered</span>' : '<i class="fas fa-circle"></i> Not delivered')
|
|
|
|
|
+ ' ' + +(package.items[i].delivered ? '<span class="text-color-green"><i class="fas fa-check-circle"></i> Delivered</span>' : '<i class="fas fa-circle"></i> Not delivered')
|
|
|
|
|
+ ' </span>'
|
|
|
|
|
+ ' </div>'
|
|
|
|
|
+ ' <h3>'
|
|
|
|
@ -80,6 +84,8 @@ function openPackageInfoSheet(package, refreshOnly) {
|
|
|
|
|
if (!refreshOnly) {
|
|
|
|
|
app.sheet.create({el: "#package-info-sheet"}).open();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setMapLocation(latitude, longitude) {
|
|
|
|
|