Browse Source

* ADD: tables restyle
* ADD: restore as400 imports from PENDING status to NEW

Giancarlo Voci 8 years ago
parent
commit
286fb40b81
5 changed files with 33 additions and 14 deletions
  1. 16 1
      src/Modules/Dimatec/MigrationData.php
  2. 4 0
      src/Modules/Dimatec/Pages.php
  3. 5 6
      ui/bind.tpl
  4. 2 1
      ui/js/omlink.js
  5. 6 6
      ui/pick2light.tpl

+ 16 - 1
src/Modules/Dimatec/MigrationData.php

@@ -60,7 +60,7 @@ class MigrationData
   public function SoapConnector(string $serverAddress)
   public function SoapConnector(string $serverAddress)
   {
   {
     global $frameworkUtils;
     global $frameworkUtils;
-    if($frameworkUtils->isServerAlive($serverAddress, 80, 2)>0)
+    if ($frameworkUtils->isServerAlive($serverAddress, 80, 2) > 0)
       throw new \Exception('Magazzino Verticale non raggiungibile');
       throw new \Exception('Magazzino Verticale non raggiungibile');
 
 
     $this->soapClient = new \SoapClient("http://$serverAddress/servizi_xchange.asmx?wsdl", array(
     $this->soapClient = new \SoapClient("http://$serverAddress/servizi_xchange.asmx?wsdl", array(
@@ -91,6 +91,21 @@ class MigrationData
     $this->query("UPDATE SMEDAT_DIM.INTMAV0F SET MXSTAT=" . MigrationData::STATUS_PENDING . ", MXNOLS='$listaId' WHERE MXIDDM IN ($ids)");
     $this->query("UPDATE SMEDAT_DIM.INTMAV0F SET MXSTAT=" . MigrationData::STATUS_PENDING . ", MXNOLS='$listaId' WHERE MXIDDM IN ($ids)");
   }
   }
 
 
+  /**
+   * Set all missions in STATUS_PENDING status as STATUS_DONE
+   */
+  public function RollbackPendingMissionsToNew()
+  {
+    $this->query(
+      "UPDATE SMEDAT_DIM.INTMAV0F SET MXSTAT=" . MigrationData::STATUS_NEW . " WHERE MXSTAT=" . MigrationData::STATUS_PENDING
+    );
+  }
+
+  /**
+   * @param string $labelId
+   * @param string $articleCode
+   * @param string $commessa
+   */
   public function MarkMissionDone(string $labelId, string $articleCode, string $commessa)
   public function MarkMissionDone(string $labelId, string $articleCode, string $commessa)
   {
   {
     $this->query(
     $this->query(

+ 4 - 0
src/Modules/Dimatec/Pages.php

@@ -135,6 +135,9 @@ class Pages extends Controller
       case 3: // empty list
       case 3: // empty list
         $distinteDaCancellare = new Distinta();
         $distinteDaCancellare = new Distinta();
         $distinteDaCancellare->TrashCommesse();
         $distinteDaCancellare->TrashCommesse();
+        $md = new MigrationData();
+        $md->DB2Connector();
+        $md->RollbackPendingMissionsToNew();
         $f3->reroute("/pick2light/1");
         $f3->reroute("/pick2light/1");
         return;
         return;
         break;
         break;
@@ -239,6 +242,7 @@ class Pages extends Controller
   /**
   /**
    * Import lists from as400
    * Import lists from as400
    * @param $f3
    * @param $f3
+   * @throws \Exception
    */
    */
   public function ImportFromAS400($f3)
   public function ImportFromAS400($f3)
   {
   {

+ 5 - 6
ui/bind.tpl

@@ -1,11 +1,10 @@
 <div class="row h-100 justify-content-center w-100">
 <div class="row h-100 justify-content-center w-100">
 	<div class="col-xs-12 col-md-9 col-lg-5 align-self-center">
 	<div class="col-xs-12 col-md-9 col-lg-5 align-self-center">
-		<div>
-
-			{*Tabella elenco commesse*}
-			<table class="table table-sm table-striped table-light">
-				<thead class="bg-secondary">
-				<tr>
+		<div class="rounded table-responsive mt-3 mb-2" style="background-color: #a0b1cc">
+			{*Tabella elenco prebolle*}
+			<table class="table rounded table-striped table-secondary mb-0" style="font-size: 11pt">
+				<thead style="background-color: #a0b1cc">
+				<tr style="font-size: 12pt">
 					<th class="text-center text-uppercase text-white" scope="col">Binding Elenco Ordini</th>
 					<th class="text-center text-uppercase text-white" scope="col">Binding Elenco Ordini</th>
 				</tr>
 				</tr>
 				</thead>
 				</thead>

+ 2 - 1
ui/js/omlink.js

@@ -58,7 +58,8 @@ function NotificationDelete(link, code) {
 
 
 function SetupConfirmationDialog() {
 function SetupConfirmationDialog() {
   $('.requestconfirm').on('click', function (ev) {
   $('.requestconfirm').on('click', function (ev) {
-    if (!confirm('Sicuro di voler cancellare la lista?'))
+    let confirmText = $(this).data('confirmtext');
+    if (!confirm(confirmText))
       ev.preventDefault();
       ev.preventDefault();
   });
   });
 }
 }

+ 6 - 6
ui/pick2light.tpl

@@ -42,15 +42,15 @@
 		</form>
 		</form>
 	</div>
 	</div>
 	<div class="col-md-8">
 	<div class="col-md-8">
-		<div class="table-responsive">
-			<table class="table table-striped table-secondary" style="font-size: 10pt;">
-				<thead>
-				<tr style="font-size: 12pt" class="bg-warning">
+		<div class="rounded table-responsive mt-3" style="background-color: #a0b1cc">
+			<table class="table rounded table-striped table-secondary mb-0" style="font-size: 11pt">
+				<thead style="background-color: #a0b1cc">
+				<tr style="font-size: 12pt">
 					<th class="text-center text-uppercase" colspan="6" scope="col">Articoli da ventilare
 					<th class="text-center text-uppercase" colspan="6" scope="col">Articoli da ventilare
-						<a class="requestconfirm" href="{{@BASEURL}}/pick2light/3"><img class="float-right" src="{{@BASEURL}}/ui/images/delete.png"/></a>
+						<a class="requestconfirm" data-confirmtext="Sicuro di voler cancellare la lista?" href="{{@BASEURL}}/pick2light/3"><img class="float-right" src="{{@BASEURL}}/ui/images/delete.png"/></a>
 					</th>
 					</th>
 				</tr>
 				</tr>
-				<tr style="font-size: 12pt" class="bg-warning">
+				<tr style="font-size: 12pt">
 					<th scope="col">UDS</th>
 					<th scope="col">UDS</th>
 					<th scope="col">Articoli</th>
 					<th scope="col">Articoli</th>
 					<th scope="col">Descrizione</th>
 					<th scope="col">Descrizione</th>