Merge branch 'develop' into feature/SmetarMES
# Conflicts: # public_html/gest-lib/monitoraggio_linee_v2/classes/MonitoraggioLineeV2.class.php
This commit is contained in:
@@ -28,7 +28,8 @@
|
||||
"moment",
|
||||
"date-formats",
|
||||
"animate",
|
||||
"firebase"
|
||||
"firebase",
|
||||
"navbar"
|
||||
]
|
||||
},
|
||||
"jquery": {
|
||||
@@ -507,5 +508,10 @@
|
||||
"ts": [
|
||||
"assets/visibility/visibility.min.js"
|
||||
]
|
||||
},
|
||||
"navbar": {
|
||||
"js": [
|
||||
"assets/navbar/navbar.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
40
public_html/assets/navbar/navbar.js
Normal file
40
public_html/assets/navbar/navbar.js
Normal file
@@ -0,0 +1,40 @@
|
||||
$(function () {
|
||||
|
||||
});
|
||||
|
||||
const _navbar = {
|
||||
enableNotifications: true,
|
||||
|
||||
init: function () {
|
||||
},
|
||||
|
||||
initNotification: function (options) {
|
||||
const $navbarNotifications = $("#navbar-notifications");
|
||||
|
||||
$navbarNotifications.on("click", async function (e) {
|
||||
const $this = $(this);
|
||||
const $visibleIcon = $(this).find("i:visible");
|
||||
const attivaNotifiche = $visibleIcon.hasClass("notificationOff");
|
||||
|
||||
const response = await _notifiche.modalNotifiche(attivaNotifiche, options);
|
||||
|
||||
if (response) {
|
||||
$this.find(".notificationOff").toggleClass("hidden");
|
||||
$this.find(".notificationOn").toggleClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
if (options?.notificheAbilitate) {
|
||||
$navbarNotifications.find(".notificationOff").toggleClass("hidden");
|
||||
$navbarNotifications.find(".notificationOn").toggleClass("hidden");
|
||||
} else if (options?.flagAttivaNotificheSilenziosamente) {
|
||||
$navbarNotifications.trigger("click");
|
||||
}
|
||||
|
||||
if (options?.flagAttivaNotificheSilenziosamente) {
|
||||
$navbarNotifications.addClass("hidden");
|
||||
} else {
|
||||
$navbarNotifications.removeClass("hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ if (!defined("ROOT")) {
|
||||
|
||||
include "vendor/autoload.php";
|
||||
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(realpath(__DIR__ . "/.."), array(".env", ".env.dev", ".env.prod"), false);
|
||||
$dir = __DIR__;
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(realpath($dir . "/.."), array(".env", ".env.dev", ".env.prod"), false);
|
||||
|
||||
$dotenv->safeLoad();
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 panel-default panel-collapsible xcollapsed" data-cq_panel="fermiMacchina">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr class="font-size-15">
|
||||
<th colspan="3" class="text-center font-weight-bold">Fermi macchina</th>
|
||||
</tr>
|
||||
<tr class="font-size-15">
|
||||
<?php foreach ($fermiMacchina as $fermoMacchina) { ?>
|
||||
<td class="vertical-middle col-sm-4 text-center">
|
||||
<?= $fermoMacchina["controllo"] ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php
|
||||
foreach ($fermiMacchina as $fermoMacchina) {
|
||||
$valoreRif = array_get($fermoMacchina, "valore_rif");
|
||||
$valoreRil = array_get($fermoMacchina['rip'][0], "valore_ril", "");
|
||||
?>
|
||||
<td class="vertical-middle col-sm-4 text-center"
|
||||
data-id_riga="<?= $fermoMacchina["id_riga"] ?>"
|
||||
data-controllo="<?= $fermoMacchina['controllo'] ?>"
|
||||
data-repetitions=<?= $fermoMacchina['num_rip'] ?>>
|
||||
<div class="col-sm-12 input-group mb-6">
|
||||
<?php if ($valoreRif) { ?>
|
||||
<input type="date" class="form-control controlInput" id="dataIniz" name="valore_ril"
|
||||
data-id_riga="<?= $fermoMacchina["id_riga"] ?>"
|
||||
data-num_rip="<?= $i + 1 ?>"
|
||||
data-prev="<?= $valoreRil ?>"
|
||||
value="<?= $valoreRil ?>">
|
||||
<?php } else { ?>
|
||||
<input type="text" class="form-control controlInput"
|
||||
data-id_riga="<?= $fermoMacchina["id_riga"] ?>"
|
||||
data-num_rip="<?= $i + 1 ?>"
|
||||
data-prev="<?= $valoreRil ?>"
|
||||
value="<?= $valoreRil ?>">
|
||||
<?php } ?>
|
||||
</div>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,24 +52,23 @@ class CQDR03P06 {
|
||||
$ripRecord = self::getRipRecord($cq, $numRip);
|
||||
return !is_null($ripRecord) ? $ripRecord["data_ril"] : null;
|
||||
}
|
||||
|
||||
/************************ USELESS AT THE MOMENT ***************************
|
||||
*
|
||||
* public function retrieveQualityInfo($processingOrder=null,$processingDate=null,$management=null)
|
||||
* {
|
||||
* $Query = new Query();
|
||||
* $Query->importSqlFile("retrieveQualityInfo")
|
||||
* ->setVar("num_ord",$processingOrder)
|
||||
* ->setDateVar("data_ord",$processingDate)
|
||||
* ->setVar("gestione",$management);
|
||||
*
|
||||
* return $Query->toRet()->date2ts(false)->execute();
|
||||
* }*/
|
||||
}
|
||||
|
||||
$processingOrder = $data['key']['num_ord']; /*num. ordine di lavorazione*/
|
||||
$processingDate = $data['key']['data_ord']; /*data unix dell'ordine di lavorazione*/
|
||||
$management = $data['key']['gestione']; /*gestione*/
|
||||
$processingOrder = $data['key']['num_ord']; /* num. ordine di lavorazione */
|
||||
$processingDate = $data['key']['data_ord']; /* data unix dell'ordine di lavorazione */
|
||||
$management = $data['key']['gestione']; /* gestione */
|
||||
|
||||
$mtbAart = MonitoraggioLineeV2::getMtbAart($data['key']["cod_prod"]);
|
||||
|
||||
$groupedDtbOrdCQ = array();
|
||||
|
||||
foreach ($arr_cq as $element) {
|
||||
$groupedDtbOrdCQ[$element['tipologia']][] = $element;
|
||||
}
|
||||
|
||||
$standardCQ = array_get($groupedDtbOrdCQ, "STANDARD", array());
|
||||
$fermiMacchina = array_get($groupedDtbOrdCQ, "FERMI_MACCHINA", array());
|
||||
|
||||
$CQDR03P06 = new CQDR03P06($arr_cq);
|
||||
?>
|
||||
<div class="row">
|
||||
@@ -89,7 +88,7 @@ $CQDR03P06 = new CQDR03P06($arr_cq);
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($arr_cq as $singleControl) { ?>
|
||||
<?php foreach ($standardCQ as $singleControl) { ?>
|
||||
<tr class="">
|
||||
<td class="vertical-middle col-sm-4 text-center">
|
||||
<?= $singleControl['controllo'] ?>
|
||||
@@ -114,11 +113,15 @@ $CQDR03P06 = new CQDR03P06($arr_cq);
|
||||
value="<?= ($singleControl['rip'][$i]['valore_ril']) ?>">
|
||||
<span class="plus <?= $singleControl['num_rip'] == count($singleControl['rip']) ? ("cursor-pointer") : ("disabled") ?> btn input-group-addon py-0"
|
||||
title="<?= $singleControl['num_rip'] == count($singleControl['rip']) ? ("Aggiungi ulteriore misurazione") : ("Non sono previste altre misurazioni per questo controllo") ?>">
|
||||
<div class='p-0'><i class="fa fa-plus text-success"></i></div>
|
||||
<span class='p-0'>
|
||||
<i class="fa fa-plus text-success"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class=" trash btn input-group-addon py-0 cursor-pointer"
|
||||
title="elimina dato">
|
||||
<div class='p-0'><i class="fa fa-trash-alt text-danger"></i></div>
|
||||
<span class="trash btn input-group-addon py-0 cursor-pointer"
|
||||
title="Elimina Dato">
|
||||
<span class='p-0'>
|
||||
<i class="fa fa-trash-alt text-danger"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<?php
|
||||
@@ -177,6 +180,12 @@ $CQDR03P06 = new CQDR03P06($arr_cq);
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ($mtbAart["cod_mgrp"] === "SL" && count($fermiMacchina) > 0) {
|
||||
include "cq_DR03P06-SL.php";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -133,7 +133,25 @@ export default class PopupRiepGiorno extends BasePopup {
|
||||
.title(`Riepilogo consegne del ${this.dataCons.format("D MMMM YYYY")}`)
|
||||
.style("success")
|
||||
.gridSize({xs: 12})
|
||||
.closeOnly()
|
||||
.okCancel()
|
||||
.btOK({
|
||||
text: "Chiudi",
|
||||
style: "default",
|
||||
dismissOnClick: true
|
||||
})
|
||||
.btCancel({
|
||||
text: "Stampa",
|
||||
style: "primary",
|
||||
onClick: async (e, $btn) => {
|
||||
$btn.btn_setWaitStatus();
|
||||
|
||||
try {
|
||||
await this.printViaggi(this.dataCons);
|
||||
} finally {
|
||||
$btn.btn_setWaitStatus(false);
|
||||
}
|
||||
}
|
||||
})
|
||||
.backdropStatic(true)
|
||||
.onClose(() => this.contextMenuTableRiepiloghi?.destroy());
|
||||
|
||||
@@ -879,4 +897,15 @@ export default class PopupRiepGiorno extends BasePopup {
|
||||
|
||||
return ret?.returnData as Array<Viaggio>;
|
||||
}
|
||||
|
||||
async printViaggi(dataCons: Moment) {
|
||||
const ret = await this.ajax()
|
||||
.get("printViaggi")
|
||||
.data({dataCons: dataCons.unix()})
|
||||
.noticeAsModal()
|
||||
.onSuccess({modalBox: {IFrame: true}})
|
||||
.execute();
|
||||
|
||||
return ret?.returnId === 1;
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
nav#nb-main{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;margin-bottom:0}@media(min-width: 768px){nav#nb-main #nb-main-collapse{display:none !important}}nav#nb-main .dropdown-menu{font-size:inherit}nav#nb-main #navbar-messenger>a,nav#nb-main #navbar-user>a{color:#444;padding:14px}nav#nb-main #navbar-user .nb-dp{padding:14px}nav#nb-main #navbar-user .nb-dp a{padding:0}nav#nb-main #navbar-user .nb-dp a:hover{background:none}nav#nb-main #navbar-messenger .nb-dp{padding:4px}nav#nb-main #navbar-messenger .nb-dp .list-group{max-height:200px;overflow-y:auto}nav#nb-main .nb-dp{background-color:rgba(255,255,255,.85);min-width:250px;overflow:hidden}nav#nb-main .btn-group.open .dropdown-toggle{box-shadow:none}nav#nb-main .navbar-center{position:absolute;z-index:-1;width:100%;left:0;padding-top:8px;text-align:center;margin:auto;height:100%}nav#nb-main .navbar-center #titlebar{font-size:24px;font-weight:bold}.navbar-default .nb-logo{max-height:40px;margin:5px}#nb-overlay{top:0;display:none;position:fixed;width:100vw;height:100vh;background:rgba(0,0,0,.7);z-index:1039;opacity:0}#nb-overlay.active{display:block;opacity:1}/*# sourceMappingURL=navbar.css.map */
|
||||
nav#nb-main{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;margin-bottom:0}@media(min-width: 768px){nav#nb-main #nb-main-collapse{display:none !important}}nav#nb-main .dropdown-menu{font-size:inherit}nav#nb-main #navbar-messenger>a,nav#nb-main #navbar-user>a{color:#444;padding:14px}nav#nb-main #navbar-user .nb-dp{padding:14px}nav#nb-main #navbar-user .nb-dp a{padding:0}nav#nb-main #navbar-user .nb-dp a:hover{background:none}nav#nb-main #navbar-messenger .nb-dp{padding:4px}nav#nb-main #navbar-messenger .nb-dp .list-group{max-height:200px;overflow-y:auto}nav#nb-main #navbar-notifications .circle{position:absolute;top:15px;right:9px;width:10px;height:10px;-webkit-border-radius:25px;-moz-border-radius:25px;border-radius:25px;background:red}nav#nb-main #navbar-notifications .circle.active{background:green}nav#nb-main .nb-dp{background-color:rgba(255,255,255,.85);min-width:250px;overflow:hidden}nav#nb-main .btn-group.open .dropdown-toggle{box-shadow:none}nav#nb-main .navbar-center{position:absolute;z-index:-1;width:100%;left:0;padding-top:8px;text-align:center;margin:auto;height:100%}nav#nb-main .navbar-center #titlebar{font-size:24px;font-weight:bold}.navbar-default .nb-logo{max-height:40px;margin:5px}#nb-overlay{top:0;display:none;position:fixed;width:100vw;height:100vh;background:rgba(0,0,0,.7);z-index:1039;opacity:0}#nb-overlay.active{display:block;opacity:1}/*# sourceMappingURL=navbar.css.map */
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -243,7 +243,8 @@ class ContrattiDiAcquisto {
|
||||
->set("sconto8", $row["perc_4"])
|
||||
->set("percProv", $row["perc_prov"])
|
||||
->set("valProv", $row["val_prov"])
|
||||
->set("codArtForn", $row["cod_art_forn"]);
|
||||
->set("codArtForn", $row["cod_art_forn"])
|
||||
->set("descrizione", $row["descrizione_art"]);
|
||||
|
||||
$atbOfft->set("atbOffr")->append($atbOffr);
|
||||
}
|
||||
@@ -272,9 +273,9 @@ class ContrattiDiAcquisto {
|
||||
$JP = $Ret->get("JP");
|
||||
$key = $data["key"];
|
||||
$JP->param("cod_alis", array_get($key, "codAlis"))
|
||||
->param("id_contratto", strval(array_get($key, "idContratto")))
|
||||
->param("id_contratto", strval(array_get($key, "id_contratto")))
|
||||
->cacheAs(sprintf("Contratto di Acquisto n. %s",
|
||||
$key["idContratto"]
|
||||
$key["id_contratto"]
|
||||
));
|
||||
$Ret = $JP->run();
|
||||
}
|
||||
@@ -371,7 +372,7 @@ class ContrattiDiAcquisto {
|
||||
|
||||
} else {
|
||||
$Mailer->addAttachment($filePath);
|
||||
$textEmail = "Nella presente e-mail alleghiamo il pdf riepilogativo dell'contratto num. <b>{$key["versione"]}</b>";
|
||||
$textEmail = "Nella presente e-mail alleghiamo il pdf riepilogativo dell'contratto num. <b>{$key["num_off"]}</b>";
|
||||
}
|
||||
|
||||
$textEmail .= "<br/><br/>
|
||||
@@ -401,7 +402,7 @@ class ContrattiDiAcquisto {
|
||||
->from(\User::get_current_userEmail())
|
||||
->replyTo(\User::get_current_userEmail())
|
||||
->addTo($listEmail)
|
||||
->subject("Inoltro PDF contratto {$key["versione"]}")
|
||||
->subject("Inoltro PDF contratto {$key["num_off"]}")
|
||||
->azienda(\Azienda::getId())
|
||||
->message($textEmail);
|
||||
|
||||
@@ -437,7 +438,7 @@ class ContrattiDiAcquisto {
|
||||
}
|
||||
|
||||
public static function calcHash($key) {
|
||||
$s = $key["cod_alis"] . $key["versione"];
|
||||
$s = $key["cod_alis"] . $key["num_off"];
|
||||
return substr(md5($s), 0, 10);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ PopupEsporta.prototype.open = function () {
|
||||
// delete self;
|
||||
}).content(
|
||||
_contrattiDiAcquisto.getModule().get_$template("popupEsporta"))
|
||||
.title("Invia al cliente <small>Conferma contratto n. <b>" + self._key.versione + "</b></small>")
|
||||
.title("Invia al cliente <small>Conferma contratto n. <b>" + self._key.num_off + "</b></small>")
|
||||
.gridSize({xs: 12, sm: 10, md: 8}).info().okCancel().backhash().show();
|
||||
}).fail(function () {
|
||||
// delete self;
|
||||
@@ -213,8 +213,8 @@ PopupEsporta.prototype._buildTr = function (fileItem) {
|
||||
};
|
||||
|
||||
PopupEsporta.prototype._refreshFileList = function () {
|
||||
let self = this;
|
||||
let d = $.Deferred();
|
||||
const self = this;
|
||||
const d = $.Deferred();
|
||||
|
||||
self._fileList = [];
|
||||
let fileList = [];
|
||||
@@ -225,20 +225,19 @@ PopupEsporta.prototype._refreshFileList = function () {
|
||||
return x;
|
||||
});
|
||||
|
||||
let reportFileName = "Contratto di Acquisto n." + self._key.versione + ".pdf";
|
||||
|
||||
let reportUrl = new JasperReportDownloader()
|
||||
const reportFileName = "Contratto di Acquisto n." + self._key.num_off + ".pdf";
|
||||
const reportUrl = new JasperReportDownloader()
|
||||
.reportName(_contrattiDiAcquisto.getReportNameContratto())
|
||||
.parameter("cod_alis", self._key.cod_alis)
|
||||
.parameter("versione", self._key.versione)
|
||||
.parameter("versione", self._key.num_off)
|
||||
.parameter("user_name", _USER.username)
|
||||
.resultFileName(reportFileName)
|
||||
.getDownloadUrl();
|
||||
|
||||
fileList = array_prepend(fileList, {file_name: reportFileName, url: reportUrl});
|
||||
|
||||
self._fileList = fileList;
|
||||
d.resolve();
|
||||
|
||||
}).fail(function () {
|
||||
d.reject();
|
||||
});
|
||||
|
||||
@@ -932,7 +932,7 @@ PopupOfferta.prototype.open = function () {
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
$("[data-toggle=\"tooltip\"]").tooltip()
|
||||
})
|
||||
})
|
||||
.onError({
|
||||
@@ -1075,22 +1075,22 @@ PopupOfferta.prototype._refreshBtInitExport = function () {
|
||||
};
|
||||
|
||||
PopupOfferta.prototype._onBtInitExport = function () {
|
||||
let self = this;
|
||||
let $div = self._modalBox.$div;
|
||||
let $btInitExport = $div.find("#btInitExport");
|
||||
const self = this;
|
||||
const $div = self._modalBox.$div;
|
||||
const $btInitExport = $div.find("#btInitExport");
|
||||
$btInitExport.btn_setWaitStatus();
|
||||
|
||||
self.salvaContratto(false).then(function () {
|
||||
let righeContratto = self.modalBox.$div.find("#listRigheOfferta").DataTable().data()
|
||||
const righeContratto = self.modalBox.$div.find("#listRigheOfferta").DataTable().data()
|
||||
.filter(row => row.qta_acq_contr > 0 && row.prz_acq > 0)
|
||||
.toArray();
|
||||
|
||||
let productList = _.uniqBy(_.map(righeContratto, function (x) {
|
||||
const productList = _.uniqBy(_.map(righeContratto, function (x) {
|
||||
return {cod_mart: x.cod_mart, descrizione: x.descr_articolo_default};
|
||||
}), "cod_mart");
|
||||
|
||||
new PopupEsporta()
|
||||
.key({id_contratto: self._idContratto})
|
||||
.key({id_contratto: self._idContratto, num_off: self._numOff, cod_alis: self._codAlis})
|
||||
.eMailList(self._listEmailsFornitore)
|
||||
.productList(productList)
|
||||
.onOpen(function () {
|
||||
@@ -1104,7 +1104,6 @@ PopupOfferta.prototype._onBtInitExport = function () {
|
||||
.open();
|
||||
|
||||
$btInitExport.btn_unsetWaitStatus();
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class ContrattiDiVendita {
|
||||
|
||||
if (array_get($data, "q")) {
|
||||
$q = trim(strtolower($data["q"]));
|
||||
$query->where("gtb_anag.cod_anag+';'+gtb_anag.rag_soc+';'+gtb_anag.part_iva LIKE '%[Q]%'")
|
||||
$query->where("gtb_anag.cod_anag+';'+gtb_anag.rag_soc+';'+ISNULL(gtb_anag.part_iva, '') LIKE '%[Q]%'")
|
||||
->setVar("Q", str_replace("'", "''", $q));
|
||||
}
|
||||
|
||||
|
||||
@@ -1704,6 +1704,30 @@ class DeliveryPlan {
|
||||
$gestSetup = new GestSetup();
|
||||
return $gestSetup->gestName('DATI_AZIENDA')->section('PLAFOND_IVA')->keySection("CHECK_ATTIVO")->asBoolean()->get();
|
||||
}
|
||||
|
||||
private static function getJPViaggi() {
|
||||
$gestSetup = (new GestSetup())->keySection("REPORT_NAME_VIAGGI");
|
||||
|
||||
return (new JasperProcessor())->load($gestSetup);
|
||||
}
|
||||
|
||||
public static function printViaggi(array $data) {
|
||||
$ret = self::getJPViaggi();
|
||||
|
||||
if ($ret->is_OK()) {
|
||||
$jp = $ret->get("JP");
|
||||
|
||||
$dataCons = array_get($data, "dataCons");
|
||||
|
||||
$jp
|
||||
->paramDate("data_cons", $dataCons)
|
||||
->cacheAs("Viaggi del " . Date::format($dataCons, Format::strftimeDMY));
|
||||
|
||||
$ret = $jp->run();
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
include "Stato.class.php";
|
||||
|
||||
@@ -849,17 +849,18 @@ class ModalMrp {
|
||||
}
|
||||
|
||||
public static function updateOrdLav($data) {
|
||||
$Ret = new Ret;
|
||||
$ret = new Ret;
|
||||
$orderLavKey = $data["key"];
|
||||
$flagInCorso = (bool)array_get($data, "flagInCorso", 0);
|
||||
|
||||
if ($orderLavKey["gestione"] !== "L") {
|
||||
return $Ret->set_error("La modifica è consentita soltanto per gli ordini di lavorazione");
|
||||
return $ret->set_error("La modifica è consentita soltanto per gli ordini di lavorazione");
|
||||
}
|
||||
|
||||
$Ret = self::getOrdine($orderLavKey);
|
||||
if ($Ret->is_OK()) {
|
||||
$ordineLav = $Ret->get_data();
|
||||
$ret = self::getOrdine($orderLavKey);
|
||||
|
||||
if ($ret->is_OK()) {
|
||||
$ordineLav = $ret->get_data();
|
||||
|
||||
$rigaOrdRif = $ordineLav["riga_ord_rif"];
|
||||
$codJfasPrev = $ordineLav["cod_jfas"];
|
||||
@@ -921,20 +922,20 @@ class ModalMrp {
|
||||
$ordineLavEdited = $ordineLav;
|
||||
$ordineLavEdited["data_ord_rif"] = $newDataOrd;
|
||||
$ordineLavEdited["cod_jfas"] = reset($codJfas);
|
||||
$Ret = self::findOrdineProd($ordineLavEdited);
|
||||
if ($Ret->is_OK()) {
|
||||
$ordProdKey = $Ret->get_data();
|
||||
$ret = self::findOrdineProd($ordineLavEdited);
|
||||
if ($ret->is_OK()) {
|
||||
$ordProdKey = $ret->get_data();
|
||||
if (is_null($ordProdKey)) { // CREO ORDINE DI PRODUZIONE
|
||||
$Ret = self::insertOrdProd($ordineLavEdited);
|
||||
if ($Ret->is_OK()) {
|
||||
$ret = self::insertOrdProd($ordineLavEdited);
|
||||
if ($ret->is_OK()) {
|
||||
$flagInsertedOrdProd = true;
|
||||
$ordProdKey = $Ret->get_data();
|
||||
$ordProdKey = $ret->get_data();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$Ret->is_OK()) {
|
||||
return $Ret;
|
||||
if (!$ret->is_OK()) {
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1043,19 +1044,38 @@ class ModalMrp {
|
||||
}
|
||||
}
|
||||
|
||||
$Ret = $entityList->send();
|
||||
$ret = $entityList->send();
|
||||
|
||||
if ($Ret->is_OK()) {
|
||||
$Ret = self::getProduzioneProdotto($ordineLav["cod_prod"]);
|
||||
if ($Ret->is_OK()) {
|
||||
$Ret->set_data(array("produzione" => $Ret->get_data()));
|
||||
if ($ret->is_OK()) {
|
||||
$ret = self::getProduzioneProdotto($ordineLav["cod_prod"]);
|
||||
|
||||
if ($ret->is_OK()) {
|
||||
$ret->set_data(array("produzione" => $ret->get_data()));
|
||||
}
|
||||
|
||||
$note = array_get($data, "note");
|
||||
$noteOld = array_get($data, "note_old");
|
||||
|
||||
if ($note !== $noteOld && $note) {
|
||||
$strDataOrdLav = date("d/m/Y", $dataOrdLav);
|
||||
|
||||
$notificaNoteModificateDTO = new EntityItem;
|
||||
$notificaNoteModificateDTO
|
||||
->set("dataOrdLav", $strDataOrdLav)
|
||||
->set("numOrdLav", $numOrdLav)
|
||||
->set("codJfas", $codJfas)
|
||||
->set("note", $note);
|
||||
|
||||
$IMSApi = new IMSApi;
|
||||
$retNotifica = $IMSApi->post("notificaNoteModificate")
|
||||
->body($notificaNoteModificateDTO)->send();
|
||||
}
|
||||
} else if ($flagInsertedOrdProd) {
|
||||
OrdiniUtils::delete($ordProdKey);
|
||||
}
|
||||
}
|
||||
|
||||
return $Ret;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function deleteOrd($data) {
|
||||
|
||||
@@ -181,7 +181,7 @@ if ($Ret->is_OK()) {
|
||||
<span class="input-group-addon">Num. pedane</span>
|
||||
<input name="num_pedane" type="number"
|
||||
class="form-control no-spin-buttons text-monospace" <?= $flagInCorso === 1 ? "disabled" : "" ?>
|
||||
value="<?= array_get($data, "num_pedane", "") ?>"
|
||||
value=""
|
||||
step="1" min="0" autocomplete="off" data-required/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -215,7 +215,8 @@ if ($Ret->is_OK()) {
|
||||
<div class="col-sm-12 form-group form-group-sm">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Annotazioni</span>
|
||||
<input name="note" type="text" class="form-control" maxlength="255" value="<?= array_get($data, "note", "") ?>" autocomplete="off"/>
|
||||
<input name="note" type="text" class="form-control" maxlength="255" autocomplete="off"/>
|
||||
<input name="note_old" type="hidden"/>
|
||||
<input name="flagInCorso" type="hidden" value="<?= $flagInCorso ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -197,6 +197,7 @@ PopupOrdProd.prototype.open = function () {
|
||||
}
|
||||
|
||||
$div.find("[name='note']").val(rigaOrdine.note);
|
||||
$div.find("[name='note_old']").val(rigaOrdine.note);
|
||||
$div.find("[name='qta_prod']").val(rigaOrdine.qta_prod).trigger("change");
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,13 @@ class MonitoraggioLineeV2 {
|
||||
|
||||
public static function _moduleDatasource($filter) {
|
||||
$codJfas = $filter["cod_jfas"];
|
||||
$Ret = self::load_linea($codJfas);
|
||||
if ($Ret->is_OK()) {
|
||||
$linea = $Ret->get_data();
|
||||
$ret = self::load_linea($codJfas);
|
||||
|
||||
if ($ret->is_OK()) {
|
||||
$linea = $ret->get_data();
|
||||
$codJfas = $linea["cod_jfas"];
|
||||
$retData = array(
|
||||
array("id" => "cod_jfas", "data" => $linea["cod_jfas"]),
|
||||
array("id" => "cod_jfas", "data" => $codJfas),
|
||||
array("id" => "descrizione_linea", "data" => $linea["descrizione"]),
|
||||
array("id" => "is_auto", "data" => $linea["is_auto"]),
|
||||
array("id" => "settings", "data" => $linea["settings"]),
|
||||
@@ -22,12 +24,15 @@ class MonitoraggioLineeV2 {
|
||||
array("id" => "reportNameScheda", "data" => MonitoraggioLineeV2::getReportNameScheda()),
|
||||
array("id" => "untMisSecondaria", "data" => MonitoraggioLineeV2::getUntMisSecondaria()),
|
||||
array("id" => "flagDisableCambioDataProd", "data" => MonitoraggioLineeV2::getFlagDisableCambioDataProd()),
|
||||
array("id" => "lineeDisponibili", "data" => MonitoraggioLineeV2::getLineeDisponibili()),
|
||||
array("id" => "flagAttivaNotificheSilenziosamente", "data" => MonitoraggioLineeV2::getFlagAttivaNotificheSilenziosamente()),
|
||||
array("id" => "isAttivaRientro", "data" => MonitoraggioLineeV2::isAttivaRientro()),
|
||||
);
|
||||
$Ret->set_data($retData);
|
||||
|
||||
$ret->set_data($retData);
|
||||
}
|
||||
|
||||
return $Ret;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function getPrintQueue($codJfas) {
|
||||
@@ -259,6 +264,39 @@ class MonitoraggioLineeV2 {
|
||||
return $Ret;
|
||||
}
|
||||
|
||||
public static function getLineeDisponibili() {
|
||||
$ret = self::get_listLinee();
|
||||
$retData = $ret->get_data();
|
||||
|
||||
$lineeDisponibili = array_map(function ($linea) {
|
||||
return $linea["cod_jfas"];
|
||||
}, $retData);
|
||||
|
||||
return $lineeDisponibili;
|
||||
}
|
||||
|
||||
public static function hasTopicNotificheAbilitate($data) {
|
||||
$codJfas = array_get($data, "codJfas");
|
||||
$deviceToken = array_get($data, "deviceToken");
|
||||
|
||||
$profileDB = User::get_current_profileDb();
|
||||
$topicName = $profileDB . "_" . $codJfas;
|
||||
|
||||
$query = new Query();
|
||||
$query->importSqlFile('getWtbDeviceTokenTopics')
|
||||
->setVar('topic_name', $topicName)
|
||||
->setVar('device_token', $deviceToken);
|
||||
|
||||
return $query->toRet()->execute();
|
||||
}
|
||||
|
||||
public static function getFlagAttivaNotificheSilenziosamente() {
|
||||
$gestSetupUser = new GestSetupWebUser();
|
||||
$flagMostraDocumenti = $gestSetupUser->keySection("FLAG_ATTIVA_NOTIFICHE_SILENZIOSAMENTE")->defaultValue("N")->asBoolean()->get();
|
||||
|
||||
return $flagMostraDocumenti;
|
||||
}
|
||||
|
||||
public static function getListLineePerOrdine($ordine) {
|
||||
$query = new Query();
|
||||
|
||||
@@ -631,13 +669,6 @@ class MonitoraggioLineeV2 {
|
||||
}
|
||||
|
||||
public static function getMateriali($codJfas, $orderKey, $data = array()) {
|
||||
// $Query = new Query;
|
||||
// $Query->importSqlFile("list-materiali")
|
||||
// ->setVar("gestione", $orderKey["gestione"])
|
||||
// ->setDateVar("data_ord", $orderKey["data_ord"])
|
||||
// ->setVar("num_ord", $orderKey["num_ord"]);
|
||||
// return $Query->toRet()->execute();
|
||||
|
||||
$codMdep = self::getDepoLinea($codJfas);
|
||||
|
||||
$whereOrdine = array_keys_exists(array("gestione", "data_ord", "num_ord"), $orderKey);
|
||||
@@ -1080,6 +1111,7 @@ class MonitoraggioLineeV2 {
|
||||
->setDateVar("data_ord", $key["data_ord"])
|
||||
->setVar("num_ord", $key["num_ord"]);
|
||||
$Ret = $Query->toRet()->execute();
|
||||
|
||||
if ($Ret->is_OK()) {
|
||||
$arr_cq = $Ret->get_data();
|
||||
foreach ($arr_cq as $i => $cq) {
|
||||
@@ -1101,6 +1133,7 @@ class MonitoraggioLineeV2 {
|
||||
}
|
||||
$arr_cq[$i]["rip"] = $arr_rip;
|
||||
}
|
||||
|
||||
$Ret->set_data($arr_cq);
|
||||
}
|
||||
|
||||
@@ -1654,32 +1687,6 @@ GROUP BY mtb_colt.gestione,
|
||||
->set("codJfas", $codJfas)
|
||||
->set("flagStepAttivo", "S");
|
||||
|
||||
// $Ret = self::getStepOrderAt($orderLavKey, $codJfas, 0);
|
||||
//
|
||||
// if ($Ret->is_KO()) {
|
||||
// return $Ret;
|
||||
// }
|
||||
//
|
||||
// if (!$Ret->has_data()) {
|
||||
// $Ret = self::getStepOrderAt($orderLavKey, $data["cod_jfas_corrente"], 0);
|
||||
//
|
||||
// if ($Ret->is_KO()) {
|
||||
// return $Ret;
|
||||
// }
|
||||
//
|
||||
// $step0CodJfasCorrente = $Ret->get_data();
|
||||
//
|
||||
// $dtbOrdStep0 = clone $dtbOrdStep;
|
||||
//
|
||||
// $dtbOrdStep0
|
||||
// ->set("idStep", 0)
|
||||
// ->set("idRiga", $step0CodJfasCorrente["id_riga"] + 1)
|
||||
// ->setDatetime("dataIniz", null, true)
|
||||
// ->setDatetime("dataFine", null, true);
|
||||
//
|
||||
// $OrdLav->set("dtbOrdSteps")->append($dtbOrdStep0);
|
||||
// }
|
||||
|
||||
$OrdLav->set("dtbOrdSteps")->append($dtbOrdStep);
|
||||
} else {
|
||||
// AGGIORNA CODJFAS NEGLI STEPS
|
||||
@@ -1728,6 +1735,7 @@ GROUP BY mtb_colt.gestione,
|
||||
$EntityList->push($Entity);
|
||||
|
||||
$Ret = $EntityList->send();
|
||||
|
||||
if ($Ret->is_KO() && $flagInsertedOrdProd) {
|
||||
OrdiniUtils::delete($ordProdKey);
|
||||
}
|
||||
@@ -3175,6 +3183,14 @@ WHERE data_ord = '[dataOrd]'
|
||||
return $flagDisableCambioData;
|
||||
}
|
||||
|
||||
public static function getMtbAart($codMart) {
|
||||
$eiMtbAart = new EntityItem("mtb_aart");
|
||||
|
||||
$mtbAart = $eiMtbAart->set("codMart", $codMart)->select();
|
||||
|
||||
return $mtbAart;
|
||||
}
|
||||
|
||||
public static function createColloRientro($data) {
|
||||
$codJfas = array_get($data, "codJfas");
|
||||
$idLotto = array_get($data, "idLotto");
|
||||
|
||||
@@ -184,6 +184,9 @@ if (isset($_GET["popup-orderDetail"])) {
|
||||
} else if (isset($_POST["saveCqPartitaMagLevanplast"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["saveCqPartitaMagLevanplast"]);
|
||||
MonitoraggioLineeV2::saveCqPartitaMagLevanplast($data)->display();
|
||||
} else if (isset($_POST["hasTopicNotificheAbilitate"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["hasTopicNotificheAbilitate"]);
|
||||
MonitoraggioLineeV2::hasTopicNotificheAbilitate($data)->display();
|
||||
} else if (Controller::is_ajaxRequest()) {
|
||||
$Ret = new Ret;
|
||||
$Ret->set_errorCode(ErrorHandler::UNEXPECTED_AJAX_METHOD)->display();
|
||||
|
||||
@@ -351,18 +351,6 @@ if (!is_null($ordineLav["note"])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// $cmptOrd = array_filter($arr_materiali, function ($materiale) use ($carEx) {
|
||||
// $comp = false;
|
||||
// if (isset($materiale["alternativi"])) {
|
||||
// foreach ($materiale["alternativi"] as $alt) {
|
||||
// if ($alt["cod_mart"] === $carEx["cod_mart"]) {
|
||||
// $comp = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return $comp;
|
||||
// });
|
||||
|
||||
$compatibile = $carEx["comp"] == "S";// is_array($cmptOrd) && !empty($cmptOrd);
|
||||
?>
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
$(function () {
|
||||
|
||||
$(".sideNav a").on("click", function () {
|
||||
var modalBox = new ModalBox();
|
||||
$(".sideNav a").on("click", async function () {
|
||||
const modalBox = new ModalBox();
|
||||
modalBox.wait("Caricamento <b>Linea " + $(this).getDataAttr("descr_linea") + "</b>");
|
||||
_monitoraggioLinee.stop();
|
||||
});
|
||||
|
||||
$("a[data-toggle=\"pill\"]").on("shown.bs.tab", function (e) {
|
||||
var target = $(e.target).attr("href");
|
||||
$("a[data-toggle='pill']").on("shown.bs.tab", function (e) {
|
||||
const target = $(e.target).attr("href");
|
||||
|
||||
if ($(e.currentTarget).parent().hasClass("disabled")) {
|
||||
return;
|
||||
}
|
||||
if (target == "#tab-statoMacchine") {
|
||||
|
||||
if (target === "#tab-statoMacchine") {
|
||||
_monitoraggioLinee.stato.onShown();
|
||||
} else if (_.eq(target, "#tab-storicoOrdini")) {
|
||||
_monitoraggioLinee.storicoOrdini.onShown();
|
||||
@@ -30,6 +31,7 @@ const _monitoraggioLinee = {
|
||||
codJfas: null,
|
||||
isAuto: null,
|
||||
module: null,
|
||||
lineeDisponibili: null,
|
||||
|
||||
storicoOrdini: null,
|
||||
ordini: null,
|
||||
@@ -41,8 +43,8 @@ const _monitoraggioLinee = {
|
||||
this.classMap[id] = classRef;
|
||||
},
|
||||
|
||||
init: function () {
|
||||
var self = this;
|
||||
init: async function () {
|
||||
const self = this;
|
||||
self.ordini = _ordini;
|
||||
self.stato = _stato;
|
||||
self.codaStampa = _codaStampa;
|
||||
@@ -51,27 +53,68 @@ const _monitoraggioLinee = {
|
||||
if (isset_urlParameter("linea")) {
|
||||
self.codJfas = get_urlParameter("linea");
|
||||
}
|
||||
var dataSourceFlt = {cod_jfas: self.codJfas};
|
||||
|
||||
const dataSourceFlt = {cod_jfas: self.codJfas};
|
||||
|
||||
self.module = new Module();
|
||||
|
||||
/************************* HERE PRINCIPAL INFO ABOUT THE THREE SECTIONS ARE RETRIEVED *********************************/
|
||||
self.module.load({dataSource: dataSourceFlt}).then(function (ret) {
|
||||
self.module.load({dataSource: dataSourceFlt}).then(async function (ret) {
|
||||
if (ret.returnId === 1) {
|
||||
self.codJfas = self.module.get_dataSource("cod_jfas");
|
||||
self.descrizioneLinea = self.module.get_dataSource("descrizione_linea");
|
||||
self.isAuto = self.module.get_dataSource("is_auto");
|
||||
self.settings = self.module.get_dataSource("settings");
|
||||
self.lineeDisponibili = self.module.get_dataSource("lineeDisponibili");
|
||||
self.hasTopicNotificheAbilitate = false;
|
||||
self.flagAttivaNotificheSilenziosamente = false;
|
||||
|
||||
try {
|
||||
const deviceToken = await _notifiche.getToken();
|
||||
|
||||
if (deviceToken) {
|
||||
const ret = await new Ajax()
|
||||
.post("hasTopicNotificheAbilitate")
|
||||
.data({
|
||||
codJfas: self.codJfas,
|
||||
deviceToken: deviceToken
|
||||
})
|
||||
.noticeAsModal()
|
||||
.waitModal()
|
||||
.execute();
|
||||
|
||||
self.hasTopicNotificheAbilitate = ret?.returnData.length > 0;
|
||||
self.flagAttivaNotificheSilenziosamente = self.module.get_dataSource("flagAttivaNotificheSilenziosamente");
|
||||
}
|
||||
} catch (e) {
|
||||
// console.log(e);
|
||||
}
|
||||
|
||||
const topics = self.lineeDisponibili.map(function (e) {
|
||||
return _USER.profileDb + "_" + e
|
||||
});
|
||||
|
||||
const options = {
|
||||
topics: topics,
|
||||
notificheAbilitate: self.hasTopicNotificheAbilitate,
|
||||
flagAttivaNotificheSilenziosamente: self.flagAttivaNotificheSilenziosamente,
|
||||
}
|
||||
|
||||
_navbar.initNotification(options);
|
||||
|
||||
if (!_.isNil(self.descrizioneLinea)) {
|
||||
$("#navbarSubTtitle").text(" - " + self.descrizioneLinea);
|
||||
}
|
||||
var hasSueprvisorPanel = !_.isEmpty(self.settings) && !_.isNil(self.settings.supervisorServiceIp) && !_.isEmpty(self.settings.supervisorServiceIp);
|
||||
|
||||
const hasSueprvisorPanel = !_.isEmpty(self.settings) && !_.isNil(self.settings.supervisorServiceIp) && !_.isEmpty(self.settings.supervisorServiceIp);
|
||||
self.ordini.init();
|
||||
self.ordini.refresh_table();
|
||||
self.stato.init(self.isAuto, hasSueprvisorPanel);
|
||||
|
||||
if (self.hasCodaStampa()) {
|
||||
self.codaStampa.init(self.codJfas);
|
||||
}
|
||||
|
||||
$("#pillStoricoOrdini").removeClass("disabled");
|
||||
self.storicoOrdini.init({
|
||||
codJfas: self.codJfas,
|
||||
|
||||
@@ -474,6 +474,7 @@ export const _ordini = {
|
||||
cod_mdep: ordine.codMdep,
|
||||
descrizione_prod: ordine.descrizioneProd,
|
||||
cod_anag: ordine.codAnag,
|
||||
cod_prod: ordine.codProd,
|
||||
};
|
||||
let ordProdKey = {gestione: ordine.gestione, data_ord: ordine.dataOrdProd, num_ord: ordine.numOrdProd};
|
||||
|
||||
@@ -550,15 +551,17 @@ export const _ordini = {
|
||||
}
|
||||
dataFineStimata = !is_null(dataFineStimata) ? dataFineStimata.unixtime_format("DD/MM/YYYY") + "<br/><small>" + dataFineStimata.unixtime_format("HH:mm:ss") + "</small>" : "";
|
||||
}
|
||||
if (!_.isNil(ordine.runTimeEnd)) {
|
||||
|
||||
if (!_.isNil(ordine.runTimeEnd)) {
|
||||
if (_.isNumber(ordine.setupTime)) {
|
||||
dataFineStimata += "<br/><b>Setup:</b> 0m";
|
||||
}
|
||||
|
||||
dataFineStimata = "<b>Durata:</b> " + (ordine.runTimeHour > 0 ? (ordine.runTimeHour + "h ") : "") + ordine.runTimeMin + "m";
|
||||
|
||||
dataFineStimata += "<br/><b>Fine: </b> " + ordine.runTimeEnd;
|
||||
}
|
||||
|
||||
// durata = (60*60*24)*3 + (60*60*3) + (60*30) + 30 // 3 giorni, 3 ore, 30 min, 30 sec
|
||||
|
||||
let $bt_openOrderDetail = $("<button>", {
|
||||
@@ -1108,9 +1111,9 @@ export const _ordini = {
|
||||
/************************************ MODAL DETTAGLI *****************************************************************/
|
||||
view_modalDettagli: function (key, ordine, $bt) {
|
||||
const self = this;
|
||||
let ajax = new Ajax();
|
||||
let cqTab;
|
||||
const ajax = new Ajax();
|
||||
const codProd = ordine.codProd;
|
||||
let cqTab;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
ajax.get("popup-orderDetail")
|
||||
@@ -1119,8 +1122,9 @@ export const _ordini = {
|
||||
.waitModal()
|
||||
.$button($bt)
|
||||
.onSuccess(function (ret) {
|
||||
let retData = ret.returnData;
|
||||
let modalBox = new ModalBox();
|
||||
const retData = ret.returnData;
|
||||
const modalBox = new ModalBox();
|
||||
|
||||
self.modalDetail = modalBox;
|
||||
self.modalDetailCodProd = codProd;
|
||||
/***************************** ON BEFORE SHOW *******************************************/
|
||||
@@ -1165,6 +1169,7 @@ export const _ordini = {
|
||||
.onSuccess({modalBox: {IFrame: true}})
|
||||
.execute();
|
||||
});
|
||||
|
||||
$div.find(".bt_getEditCollo").on("click", function (e) {
|
||||
let $bt = $(this);
|
||||
let $tr = $bt.closest("tr");
|
||||
@@ -1617,11 +1622,12 @@ export const _ordini = {
|
||||
},
|
||||
get_pdfListaDiPrelievo: function (orderKey) {
|
||||
const ajax = new Ajax();
|
||||
|
||||
ajax.get("get_listaDiPrelievo")
|
||||
.data({key: orderKey})
|
||||
.$button($("#bt_pdfListaDiPrelievo"))
|
||||
.noticeAsModal()
|
||||
.onSuccess({downloadFile: true})
|
||||
.onSuccess({modalBox: {IFrame: true}})
|
||||
.execute();
|
||||
},
|
||||
loadGiacenze: function (rows) {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
SELECT *
|
||||
FROM wtb_device_token_topics
|
||||
INNER JOIN wtb_user_device_tokens ON wtb_device_token_topics.device_token_id = wtb_user_device_tokens.id
|
||||
WHERE topic_name = '[topic_name]'
|
||||
AND device_token = '[device_token]'
|
||||
@@ -2,11 +2,8 @@ SELECT id_riga,
|
||||
controllo,
|
||||
tipologia,
|
||||
valore_rif,
|
||||
/*num_fase,*/
|
||||
/*note,*/
|
||||
num_rip,
|
||||
flag_conf/*,
|
||||
NULL AS valore_ril*/
|
||||
flag_conf
|
||||
FROM dtb_ord_cq
|
||||
WHERE gestione = '[gestione]'
|
||||
AND data_ord = '[data_ord]'
|
||||
|
||||
@@ -12,8 +12,8 @@ WITH ord AS (SELECT cod_mart,
|
||||
FROM MRP_DailyMaterialReq() mrp
|
||||
WHERE mrp.cod_mdep = '[cod_mdep]'
|
||||
AND NOT (
|
||||
ISNULL(mrp.data_ord, GETDATE()) = '[data_ord]' AND
|
||||
ISNULL(mrp.num_ord, 0) = [num_ord]
|
||||
ISNULL(mrp.data_ord, GETDATE()) = '[data_ord]' AND
|
||||
ISNULL(mrp.num_ord, 0) = [num_ord]
|
||||
AND ISNULL(mrp.gestione, '') = '[gestione]'
|
||||
)
|
||||
AND mrp.data_mrp <= (CASE WHEN '[data_ord]' > GETDATE() THEN '[data_ord]' ELSE GETDATE() END))
|
||||
@@ -63,60 +63,9 @@ FROM (SELECT mtb_aart.cod_mart,
|
||||
ISNULL(mtb_aart.unt_mis2, '') =
|
||||
ISNULL(art.unt_mis2, '') AND
|
||||
ISNULL(mtb_aart.unt_mis3, '') =
|
||||
ISNULL(art.unt_mis3, '')
|
||||
ISNULL(art.unt_mis3, '') AND
|
||||
mtb_aart.flag_attivo = 'S'
|
||||
LEFT OUTER JOIN mtb_unt_mis
|
||||
ON mtb_aart.unt_mis = mtb_unt_mis.unt_mis
|
||||
LEFT JOIN mrp ON mrp.cod_mart = mtb_aart.cod_mart) dett
|
||||
GROUP BY cod_mart, descrizione, descrizione_estesa, unt_mis, unt_art, flag_dig, rap_conv
|
||||
|
||||
/*
|
||||
SELECT cod_mart,
|
||||
descrizione,
|
||||
descrizione_estesa,
|
||||
unt_mis,
|
||||
flag_dig,
|
||||
rap_conv,
|
||||
CASE WHEN rap_conv <> 0 THEN SUM(qta_esistente) / rap_conv ELSE 0 END AS qta_esistente
|
||||
FROM (SELECT mtb_aart.cod_mart,
|
||||
mtb_aart.descrizione,
|
||||
mtb_aart.descrizione_estesa,
|
||||
'[unt_mis]' AS unt_mis,
|
||||
ISNULL(mtb_unt_mis.flag_dig, 'N') AS flag_dig,
|
||||
CASE
|
||||
WHEN mtb_aart.unt_mis = '[unt_mis]' THEN 1
|
||||
ELSE CASE
|
||||
WHEN mtb_aart.unt_mis2 = '[unt_mis]' THEN mtb_aart.rap_conv2
|
||||
ELSE mtb_aart.rap_conv3 END END AS rap_conv,
|
||||
ISNULL(mrp.qta, 0) AS qta_esistente
|
||||
FROM mtb_aart
|
||||
INNER JOIN (SELECT cod_mgrp,
|
||||
cod_msgr,
|
||||
cod_msfa,
|
||||
unt_mis,
|
||||
unt_mis2,
|
||||
unt_mis3,
|
||||
rap_conv2,
|
||||
rap_conv3
|
||||
FROM mtb_aart
|
||||
WHERE cod_mart = '[cod_mart]') art ON mtb_aart.cod_mgrp = art.cod_mgrp AND
|
||||
mtb_aart.cod_msgr = art.cod_msgr AND
|
||||
mtb_aart.unt_mis = art.unt_mis AND
|
||||
ISNULL(mtb_aart.cod_msfa, '') =
|
||||
ISNULL(art.cod_msfa, ISNULL(mtb_aart.cod_msfa, '')) AND
|
||||
ISNULL(mtb_aart.unt_mis2, '') =
|
||||
ISNULL(art.unt_mis2, '') AND
|
||||
ISNULL(mtb_aart.unt_mis3, '') =
|
||||
ISNULL(art.unt_mis3, '')
|
||||
LEFT OUTER JOIN MRP_DailyMaterialReq() mrp ON mtb_aart.cod_mart = mrp.cod_mart AND
|
||||
mrp.cod_mdep = '[cod_mdep]' AND
|
||||
NOT (
|
||||
ISNULL(mrp.data_ord, GETDATE()) =
|
||||
'[data_ord]' AND
|
||||
ISNULL(mrp.num_ord, 0) = [num_ord]
|
||||
AND ISNULL(mrp.gestione, '') = '[gestione]'
|
||||
) AND
|
||||
mrp.data_mrp <=
|
||||
(CASE WHEN '[data_ord]' > GETDATE() THEN '[data_ord]' ELSE GETDATE() END)
|
||||
LEFT OUTER JOIN mtb_unt_mis
|
||||
ON mtb_aart.unt_mis = mtb_unt_mis.unt_mis) dett
|
||||
GROUP BY cod_mart, descrizione, descrizione_estesa, unt_mis, flag_dig, rap_conv*/
|
||||
GROUP BY cod_mart, descrizione, descrizione_estesa, unt_mis, unt_art, flag_dig, rap_conv
|
||||
@@ -127,7 +127,7 @@ const _mrpV2 = {
|
||||
field: "articolo",
|
||||
title: "Articolo",
|
||||
type: "string",
|
||||
width: "50rem",
|
||||
width: "38rem",
|
||||
attributes: {
|
||||
class: "!k-text-left"
|
||||
},
|
||||
@@ -155,7 +155,8 @@ const _mrpV2 = {
|
||||
articolo += "</div>"
|
||||
|
||||
return articolo;
|
||||
}
|
||||
},
|
||||
footerTemplate: "<div class='text-right'>TOTALE</div>"
|
||||
},
|
||||
{
|
||||
id: "f4ca4b86-cf18-486b-a77f-4beb966f43dc",
|
||||
@@ -168,8 +169,7 @@ const _mrpV2 = {
|
||||
sortable: false,
|
||||
template(data) {
|
||||
return data.criticita && `<i class="fa fa-exclamation-triangle text-danger">` || "";
|
||||
},
|
||||
footerTemplate: "TOTALE"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "d1d4991b-fc03-4ebf-a197-0be7c0866ce7",
|
||||
@@ -179,6 +179,7 @@ const _mrpV2 = {
|
||||
headerAttributes: {
|
||||
class: "umFilter disabled"
|
||||
},
|
||||
width: "8rem",
|
||||
template(data) {
|
||||
// language=HTML
|
||||
return monospace(`
|
||||
@@ -196,7 +197,7 @@ const _mrpV2 = {
|
||||
});
|
||||
}
|
||||
},
|
||||
footerTemplate: "<div class='totaleUm text-right'></div>"
|
||||
footerTemplate: "<div class='totaleUm text-center'></div>"
|
||||
},
|
||||
{
|
||||
id: "fcdbeaa6-25b1-4ec0-89ff-e0f73d05e6b5",
|
||||
@@ -206,6 +207,7 @@ const _mrpV2 = {
|
||||
attributes: {
|
||||
class: "!k-text-right"
|
||||
},
|
||||
width: "11rem",
|
||||
template(data) {
|
||||
// language=HTML
|
||||
return monospace(`
|
||||
@@ -280,7 +282,7 @@ const _mrpV2 = {
|
||||
attributes: {
|
||||
class: "!k-text-right"
|
||||
},
|
||||
width: "9rem",
|
||||
width: "8rem",
|
||||
filterable: false,
|
||||
template(data) {
|
||||
// language=HTML
|
||||
@@ -318,7 +320,7 @@ const _mrpV2 = {
|
||||
attributes: {
|
||||
class: "!k-text-right"
|
||||
},
|
||||
width: "9rem",
|
||||
width: "8rem",
|
||||
filterable: false,
|
||||
template(data) {
|
||||
// language=HTML
|
||||
@@ -1196,7 +1198,7 @@ const _mrpV2 = {
|
||||
..._.groupBy(filteredData, "unt_mis"),
|
||||
..._.groupBy(filteredData.filter(el => el.unt_mis2), "unt_mis2")
|
||||
})
|
||||
.filter(([, rows]) => rows.length === filteredData.length)
|
||||
.filter(() => self.dataSourceGrid.data().length === filteredData.length)
|
||||
);
|
||||
|
||||
e.sender.element
|
||||
|
||||
@@ -54,7 +54,6 @@ class Notifiche {
|
||||
|
||||
public static function saveDeviceToken($data) {
|
||||
$ret = new Ret();
|
||||
|
||||
$profileDb = self::getCustomProfileDb();
|
||||
|
||||
if (!is_array($data)) {
|
||||
@@ -73,9 +72,9 @@ class Notifiche {
|
||||
return $ret->set_error("App name richiesto");
|
||||
}
|
||||
|
||||
$wtbUserDeviceTocken = new EntityItem("wtb_user_device_tokens");
|
||||
$wtbUserDeviceToken = new EntityItem("wtb_user_device_tokens");
|
||||
|
||||
$wtbUserDeviceTocken
|
||||
$wtbUserDeviceToken
|
||||
->insert_or_update()
|
||||
->set("deviceToken", $data["deviceToken"])
|
||||
->set("userName", $data["userName"])
|
||||
@@ -83,17 +82,41 @@ class Notifiche {
|
||||
->set("platform", $_SERVER["HTTP_USER_AGENT"]);
|
||||
|
||||
$body = new EntityItem();
|
||||
$body->set("userDeviceToken", $wtbUserDeviceTocken, false, true);
|
||||
$body->set("userDeviceToken", $wtbUserDeviceToken, false, true);
|
||||
|
||||
$IMSApi = new IMSApi();
|
||||
|
||||
if ($profileDb) {
|
||||
$IMSApi->profileDB($profileDb);
|
||||
}
|
||||
|
||||
return $IMSApi->post("device_tokens/insert")
|
||||
->body($body)
|
||||
->send();
|
||||
}
|
||||
|
||||
public static function manageSubscriptionToTopics($data) {
|
||||
$boolSubscribe = array_get($data, "boolSubscribe");
|
||||
$topics = array_get($data, "topics");
|
||||
$serviceName = $boolSubscribe ? "subscribe" : "unsubscribe";
|
||||
|
||||
$wtbUserDeviceToken = new EntityItem("wtb_user_device_tokens");
|
||||
$wtbUserDeviceToken
|
||||
->no_op()
|
||||
->set("deviceToken", array_get($data, "wtbUserDeviceToken.deviceToken"))
|
||||
->set("userName", array_get($data, "wtbUserDeviceToken.userName"))
|
||||
->set("appName", array_get($data, "wtbUserDeviceToken.appName"));
|
||||
|
||||
$body = new EntityItem();
|
||||
$body->set("userDeviceToken", $wtbUserDeviceToken, false, true)
|
||||
->set("topics", $topics);
|
||||
|
||||
$IMSApi = new IMSApi();
|
||||
return $IMSApi->post("device_tokens/" . $serviceName)
|
||||
->body($body)
|
||||
->send();
|
||||
}
|
||||
|
||||
public static function sendNotification($data) {
|
||||
$ret = new Ret();
|
||||
|
||||
|
||||
5
public_html/gest-lib/notifiche/classes/NotificheAjax.php
Normal file
5
public_html/gest-lib/notifiche/classes/NotificheAjax.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
class NotificheAjax extends Ajax {
|
||||
|
||||
}
|
||||
@@ -6,4 +6,7 @@ if (isset($_POST["saveDeviceToken"])) {
|
||||
} else if (isset($_POST["sendNotification"])) {
|
||||
$data = Utility::sanitizeB64JSON_parse($_POST["sendNotification"]);
|
||||
Notifiche::sendNotification($data)->display();
|
||||
} else if (Controller::is_ajaxRequest()) {
|
||||
$Ret = new Ret;
|
||||
$Ret->set_errorCode(ErrorHandler::UNEXPECTED_AJAX_METHOD)->display();
|
||||
}
|
||||
@@ -12,6 +12,7 @@ const _notifiche = {
|
||||
module: null,
|
||||
moduleName: "notifiche",
|
||||
|
||||
_wtbUserDeviceToken: null,
|
||||
_firebaseConfig: null,
|
||||
_serviceWorker: null,
|
||||
_firebase: null,
|
||||
@@ -65,7 +66,7 @@ const _notifiche = {
|
||||
.align(payload.data.align || "right")
|
||||
.noAutoclose()
|
||||
.closeButton()
|
||||
.show(payload.data.body || payload.notification.body, payload.data.title || payload.notification.title);
|
||||
.show(payload.data.bodyHTML || payload.data.body || payload.notification.body, payload.data.title || payload.notification.title);
|
||||
|
||||
break;
|
||||
case "modal":
|
||||
@@ -75,7 +76,7 @@ const _notifiche = {
|
||||
<div class="text-center">
|
||||
<i class="fas fa-5x fa-${payload.data.icon || "info"} text-${payload.data.style || "info"}"></i><br>
|
||||
<h4 class="mt-10">
|
||||
${payload.data.body || payload.notification.body}
|
||||
${payload.data.bodyHTML || payload.data.body || payload.notification.body}
|
||||
</h4>
|
||||
</div>
|
||||
`)
|
||||
@@ -104,7 +105,7 @@ const _notifiche = {
|
||||
},
|
||||
|
||||
getToken: async function () {
|
||||
let self = this;
|
||||
const self = this;
|
||||
|
||||
if (!self.isLoaded()) {
|
||||
await self.init();
|
||||
@@ -118,27 +119,76 @@ const _notifiche = {
|
||||
await self.registerSW();
|
||||
}
|
||||
|
||||
let currentToken = await self._firebase.messaging().getToken({
|
||||
const currentToken = await self._firebase.messaging().getToken({
|
||||
serviceWorkerRegistration: self._serviceWorker,
|
||||
vapidKey: self._firebaseConfig.vapidKey
|
||||
});
|
||||
|
||||
let data = {
|
||||
self._wtbUserDeviceToken = {
|
||||
deviceToken: currentToken,
|
||||
userName: _USER.username,
|
||||
appName: "0" //"PVM
|
||||
appName: "0" // "PVM"
|
||||
};
|
||||
|
||||
let ajax = new Ajax();
|
||||
const ajax = new Ajax();
|
||||
ajax.post("saveDeviceToken")
|
||||
.module(self.moduleName)
|
||||
.data(data);
|
||||
.data(self._wtbUserDeviceToken);
|
||||
|
||||
await ajax.execute();
|
||||
|
||||
return currentToken;
|
||||
},
|
||||
|
||||
modalNotifiche: async function (attivaNotifiche, options) {
|
||||
const topics = options?.topics
|
||||
let response;
|
||||
|
||||
if (topics) {
|
||||
const modalBox = new ModalBox();
|
||||
response = modalBox
|
||||
.title("Attenzione")
|
||||
.yesNo()
|
||||
.info()
|
||||
.content(attivaNotifiche ? "Attivare le notifiche?" : "Disattivare le notifiche?")
|
||||
.show()
|
||||
.then(async function (response) {
|
||||
if (response) {
|
||||
return await _notifiche.manageSubscriptionToTopics(attivaNotifiche, topics);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
return response;
|
||||
},
|
||||
|
||||
manageSubscriptionToTopics: async function (boolSubscribe, topics) {
|
||||
const self = this;
|
||||
|
||||
if (!self._wtbUserDeviceToken) {
|
||||
await self.getToken();
|
||||
}
|
||||
|
||||
const data = {
|
||||
wtbUserDeviceToken: self._wtbUserDeviceToken,
|
||||
boolSubscribe: boolSubscribe,
|
||||
topics: topics,
|
||||
}
|
||||
|
||||
const ajax = new Ajax();
|
||||
ajax.post("manageSubscriptionToTopics")
|
||||
.module(self.moduleName)
|
||||
.waitModal()
|
||||
.noticeAsModal()
|
||||
.data(data);
|
||||
|
||||
const ret = await ajax.execute();
|
||||
|
||||
return ret?.returnId === 1;
|
||||
},
|
||||
|
||||
getFirebase: async function () {
|
||||
let self = this;
|
||||
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
SELECT e_mail,
|
||||
UPPER(full_name) AS full_name
|
||||
FROM (
|
||||
SELECT gtb_anag.e_mail,
|
||||
'Sede Legale' AS full_name
|
||||
FROM gtb_anag
|
||||
WHERE gtb_anag.cod_anag = '[cod_anag]'
|
||||
UNION ALL
|
||||
SELECT vtb_clie_pers_rif.e_mail,
|
||||
vtb_clie_pers_rif.persona_rif
|
||||
FROM gtb_anag
|
||||
INNER JOIN vtb_clie_pers_rif ON gtb_anag.cod_anag = vtb_clie_pers_rif.cod_anag
|
||||
WHERE gtb_anag.cod_anag = '[cod_anag]'
|
||||
UNION ALL
|
||||
SELECT vtb_dest.e_mail,
|
||||
destinatario
|
||||
FROM gtb_anag
|
||||
INNER JOIN vtb_dest ON gtb_anag.cod_anag = vtb_dest.cod_anag
|
||||
WHERE gtb_anag.cod_anag = '[cod_anag]'
|
||||
) v
|
||||
FROM (SELECT gtb_anag.e_mail,
|
||||
'Sede Legale' AS full_name
|
||||
FROM gtb_anag
|
||||
WHERE gtb_anag.cod_anag = '[cod_anag]'
|
||||
UNION ALL
|
||||
SELECT vtb_clie_pers_rif.e_mail,
|
||||
vtb_clie_pers_rif.persona_rif
|
||||
FROM gtb_anag
|
||||
INNER JOIN vtb_clie_pers_rif ON gtb_anag.cod_anag = vtb_clie_pers_rif.cod_anag
|
||||
WHERE gtb_anag.cod_anag = '[cod_anag]'
|
||||
UNION ALL
|
||||
SELECT vtb_dest.e_mail,
|
||||
destinatario
|
||||
FROM gtb_anag
|
||||
INNER JOIN vtb_dest ON gtb_anag.cod_anag = vtb_dest.cod_anag
|
||||
WHERE gtb_anag.cod_anag = '[cod_anag]') v
|
||||
WHERE dbo.f_isValidEmail(e_mail) = 1
|
||||
GROUP BY e_mail, full_name
|
||||
@@ -53,7 +53,8 @@ class TasksLauncher {
|
||||
$arr_userTask = array();
|
||||
|
||||
$GestSetup = new GestSetup;
|
||||
$arr_allTask = $GestSetup->keySection("ITEMS")->asJson()->default_value(array())->get();
|
||||
$arr_allTask = $GestSetup->keySection("ITEMS")->asJson()->defaultValue(array())->get();
|
||||
|
||||
foreach ($arr_allTask as $task) {
|
||||
if (PVM::processItemPolicyToCurrentUser($task)) {
|
||||
$arr_userTask[] = $task;
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
messaggio
|
||||
</button>
|
||||
</li>
|
||||
<li class="divider "></li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<div class="list-group"></div>
|
||||
<?php /*
|
||||
@@ -95,9 +95,20 @@
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="hidden-xs hidden" id="navbar-notifications">
|
||||
<a id="toggleNotifications" class="cursor-pointer" aria-expanded="true">
|
||||
<span>
|
||||
<i class="fa fa_1_5x fa-fw fa-bell-slash notificationOff" title="Attiva le notifiche"></i>
|
||||
<i class="fa fa_1_5x fa-fw fa-bell hidden notificationOn" title="Disattiva le notifiche"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="dropdown hidden-xs" id="navbar-user">
|
||||
<a data-toggle="dropdown" class="dropdown-toggle cursor-pointer" aria-expanded="true">
|
||||
<span><i class="fas fa-user-circle"></i> <b><?= User::get_current_username() ?></b></span>
|
||||
<span>
|
||||
<i class="fas fa-user-circle"></i> <b><?= User::get_current_username() ?></b>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu nb-dp">
|
||||
<li>
|
||||
@@ -108,8 +119,8 @@
|
||||
<i class="fas fa-user-circle"></i>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<?= User::get_current_username() ?><br/><small
|
||||
class="text-muted"><?= User::get_current_fullname() ?></small>
|
||||
<?= User::get_current_username() ?><br/>
|
||||
<small class="text-muted"><?= User::get_current_fullname() ?></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-10 hidden-usergroup-agente hidden-usergroup-cliente hidden-usergroup-ospite">
|
||||
@@ -139,7 +150,8 @@
|
||||
<i class="fas fa-user-cog"></i> <span class="text-muted">Impostazioni</span>
|
||||
</a>
|
||||
</div>
|
||||
</div><?php
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
unset($ModuloUserSettings);
|
||||
?>
|
||||
|
||||
@@ -7,7 +7,9 @@ $arr_userMenuItems = array_values(from(PVM::get_userMenuItems())
|
||||
return $x["id"];
|
||||
})
|
||||
->toArray());
|
||||
|
||||
$userCountNotifications = 0;
|
||||
|
||||
if (count($arr_userMenuItems) > 0) {
|
||||
$userCountNotifications = from($arr_userMenuItems)->sum(function ($x) {
|
||||
return is_null($x["notification"]) ? 0 : $x["notification"];
|
||||
@@ -56,14 +58,15 @@ include "include/sidebar.php";
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<span style="z-index: 3;">
|
||||
<img class="nb-logo" src="<?= Azienda::getLogo() ?>"/>
|
||||
<img class="nb-logo" src="<?= Azienda::getLogo() ?>"/>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($_SESSION)) {
|
||||
$visibilityClass = "hidden-xs";
|
||||
include "header-navbar-right.php"; ?>
|
||||
include "header-navbar-right.php";
|
||||
?>
|
||||
|
||||
<?php if (\PVM\CurrentModule::getId() === "catalogo_moda" && !Utility::is_mobile()) { ?>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
@@ -73,42 +76,39 @@ include "include/sidebar.php";
|
||||
|
||||
<!-- visibile solo su xs -->
|
||||
<div class="collapse navbar-collapse" id="nb-main-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><?php
|
||||
if (!PVM\CurrentModule::isLoad()) {
|
||||
?>
|
||||
<a href="#" class="current">Home</a><?php
|
||||
} else { ?>
|
||||
<a href="./" class="">Home</a><?php
|
||||
} ?>
|
||||
</li><?php
|
||||
foreach ($arr_userMenuItems as $menuGroup) {
|
||||
?>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<?= $menuGroup["id"] ?> <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu"><?php
|
||||
foreach ($menuGroup["items"] as $menuItem) {
|
||||
?>
|
||||
<li><a href="<?= $menuItem["href"] ?>"><?= $menuItem["title"] ?></a></li><?php
|
||||
} ?>
|
||||
</ul>
|
||||
</li><?php
|
||||
} ?>
|
||||
</ul>
|
||||
<?php
|
||||
unset($visibilityClass);
|
||||
include "header-navbar-right.php";
|
||||
?>
|
||||
</div><?php
|
||||
} ?>
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<?php if (!PVM\CurrentModule::isLoad()) { ?>
|
||||
<a href="#" class="current">Home</a>
|
||||
<?php } else { ?>
|
||||
<a href="./" class="">Home</a>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php foreach ($arr_userMenuItems as $menuGroup) { ?>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<?= $menuGroup["id"] ?> <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php foreach ($menuGroup["items"] as $menuItem) { ?>
|
||||
<li><a href="<?= $menuItem["href"] ?>"><?= $menuItem["title"] ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php
|
||||
unset($visibilityClass);
|
||||
include "header-navbar-right.php";
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</nav>
|
||||
<?php
|
||||
$navbarMinified = Utility\Str::remove_multiple_spaces(@ob_get_clean());
|
||||
|
||||
|
||||
echo $navbarMinified;
|
||||
unset($navbarMinified);
|
||||
@@ -13,8 +13,14 @@ $(function () {
|
||||
_localStorage.remove("session");
|
||||
});
|
||||
|
||||
$("#nb-main").on("dblclick", function () {
|
||||
_APP.toggleFullScreen();
|
||||
$("#nb-main").on("dblclick", function (e) {
|
||||
const $target = $(e.target);
|
||||
const tagName = $target.prop("tagName").toLowerCase();
|
||||
const allowedTags = ["div", "nav"];
|
||||
|
||||
if (allowedTags.includes(tagName)) {
|
||||
_APP.toggleFullScreen();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", ".panel.panel-collapsible > .panel-heading", function (e) {
|
||||
|
||||
@@ -1,29 +1,32 @@
|
||||
<?
|
||||
<?php
|
||||
session_start();
|
||||
include "functions.php";
|
||||
require_once "include_login.php";
|
||||
include "config.php";
|
||||
|
||||
include Controller::current_gestpath_include("ajax.php");
|
||||
//include Controller::current_gestpath_include("ajax.php");
|
||||
(new NotificheAjax())->checkAjaxRequests();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<!--html manifest="manifest.appcache"-->
|
||||
<html>
|
||||
<head>
|
||||
<? include pvm_tagHead; ?>
|
||||
<?php include pvm_tagHead; ?>
|
||||
</head>
|
||||
<body>
|
||||
<? include pvm_headerNavbar; ?>
|
||||
<?php include pvm_headerNavbar; ?>
|
||||
<div id="content">
|
||||
<div><?
|
||||
<div>
|
||||
<?php
|
||||
include pvm_navTab;
|
||||
if (!PVM\CurrentModule::isAuthorizedToCurrentUser()) {
|
||||
include pvm_unauthorized;
|
||||
} else {
|
||||
include Controller::current_gestpath_mainPage();
|
||||
} ?>
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<? include pvm_footerMinimal; ?>
|
||||
<?php include pvm_footerMinimal; ?>
|
||||
</body>
|
||||
</html>
|
||||
4
public_html/package-lock.json
generated
4
public_html/package-lock.json
generated
@@ -835,8 +835,8 @@
|
||||
},
|
||||
"node_modules/nearley": {
|
||||
"version": "2.20.1",
|
||||
"resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz",
|
||||
"integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==",
|
||||
"resolved": "git+ssh://git@github.com/integryDev/nearley.git#5d765e569d424532b7118ebe82f2bd844edfeac4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commander": "^2.19.0",
|
||||
"moo": "^0.5.0",
|
||||
|
||||
@@ -20,5 +20,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jsenv/importmap-node-module": "^5.5.3"
|
||||
},
|
||||
"overrides": {
|
||||
"sql-formatter": {
|
||||
"nearley": "github:integryDev/nearley"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,107 +1,132 @@
|
||||
nav#nb-main{
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
|
||||
/* Extra Small */
|
||||
@media(max-width:767px){}
|
||||
|
||||
/* >= Small */
|
||||
@media(min-width:768px){
|
||||
#nb-main-collapse{display:none!important;}
|
||||
}
|
||||
nav#nb-main {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
|
||||
/* Small */
|
||||
@media(min-width:768px) and (max-width:991px){
|
||||
}
|
||||
/* Extra Small */
|
||||
@media(max-width: 767px) {
|
||||
}
|
||||
|
||||
/* Medium */
|
||||
@media(min-width:992px) and (max-width:1199px){
|
||||
/* >= Small */
|
||||
@media(min-width: 768px) {
|
||||
#nb-main-collapse {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Large */
|
||||
@media(min-width:1200px){
|
||||
/* Small */
|
||||
@media(min-width: 768px) and (max-width: 991px) {
|
||||
}
|
||||
|
||||
/* Medium */
|
||||
@media(min-width: 992px) and (max-width: 1199px) {
|
||||
}
|
||||
|
||||
/* Large */
|
||||
@media(min-width: 1200px) {
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
#navbar-messenger, #navbar-user {
|
||||
> a {
|
||||
color: #444;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.dropdown-menu{
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
#navbar-messenger, #navbar-user{
|
||||
> a{
|
||||
color: #444;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
#navbar-user {
|
||||
.nb-dp {
|
||||
padding: 14px;
|
||||
|
||||
a {
|
||||
padding: 0;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#navbar-user{
|
||||
.nb-dp{
|
||||
padding: 14px;
|
||||
a{
|
||||
padding: 0;
|
||||
&:hover{
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#navbar-messenger{
|
||||
.nb-dp{
|
||||
padding: 4px;
|
||||
.list-group{
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nb-dp{
|
||||
background-color: rgba(#fff, 0.85);
|
||||
min-width: 250px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-group.open .dropdown-toggle{
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navbar-center{
|
||||
position:absolute;
|
||||
z-index: -1;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
padding-top: 8px;
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
#titlebar{
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#navbar-messenger {
|
||||
.nb-dp {
|
||||
padding: 4px;
|
||||
|
||||
.list-group {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#navbar-notifications {
|
||||
.circle {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 9px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
-webkit-border-radius: 25px;
|
||||
-moz-border-radius: 25px;
|
||||
border-radius: 25px;
|
||||
background: red;
|
||||
|
||||
&.active {
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nb-dp {
|
||||
background-color: rgba(#fff, 0.85);
|
||||
min-width: 250px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-group.open .dropdown-toggle {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navbar-center {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
padding-top: 8px;
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
height: 100%;
|
||||
|
||||
#titlebar {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-default{
|
||||
.nb-logo{
|
||||
max-height:40px;
|
||||
margin: 5px;
|
||||
}
|
||||
.navbar-default {
|
||||
.nb-logo {
|
||||
max-height: 40px;
|
||||
margin: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
#nb-overlay{
|
||||
top: 0;
|
||||
display: none;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
z-index: 1039;
|
||||
opacity: 0;
|
||||
&.active {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
#nb-overlay {
|
||||
top: 0;
|
||||
display: none;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
z-index: 1039;
|
||||
opacity: 0;
|
||||
|
||||
&.active {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -980,7 +980,7 @@
|
||||
|
||||
.widget .controller a {
|
||||
position: relative;
|
||||
background: url('../img/icon/portlet-tray.png') no-repeat;
|
||||
//background: url('../img/icon/portlet-tray.png') no-repeat;
|
||||
transition: all 0.1s linear 0s;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ button.ui-button {
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url(../../images/piechart20x9.png), url(../../../images/piechart20x9.png);
|
||||
background-image: url(../../images/piechart20x9.png);
|
||||
|
||||
$parts-list: 0 1 2 3 4 5 6 7 8;
|
||||
@each $part in $parts-list {
|
||||
|
||||
Reference in New Issue
Block a user