Skip to content

Commit

Permalink
Updates for shipment with containers
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcameron committed Aug 2, 2022
1 parent b4cdf42 commit 1217ad6
Show file tree
Hide file tree
Showing 32 changed files with 685 additions and 248 deletions.
1 change: 1 addition & 0 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@
},
"WEEKEND_CONFIGURATION" : "Weekend Configuration",
"WEIGHT": "Weight",
"TOTAL_WEIGHT": "Total Weight",
"WIDTH": "Width",
"YES": "Yes",
"YOB": "Year of Birth",
Expand Down
16 changes: 14 additions & 2 deletions client/src/i18n/en/shipment.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,31 @@
"SACK": "sack",
"SET": "set"
},
"CONTAINER_WEIGHT": "Weight (container only, not contents)",
"CREATE": "Create",
"CREATED": "Shipment successfully created",
"CREATED_BY": "Created by",
"CURRENT_DEPOT": "Current depot",
"CURRENT_LOCATION": "Current location",
"CURRENT_STATUS": "Current status",
"CONTAINER_WEIGHT_EMPTY": "Container Weight (empty)",
"CONTAINER_WEIGHT_PACKED": "Container Weight (packed)",
"CONTAINER_VALUE": "Container Value",
"DATE_DELIVERED": "Date delivered",
"DATE_PACKED": "Date packed",
"DATE_SENT": "Date sent",
"DELETE": "Delete",
"DELETED": "Shipment successfully deleted",
"DELIVERY_EXPECTED_ON": "Delivery expected on",
"DESTINATION_DEPOT": "Destination depot",
"DOCUMENT": "Document",
"DOES_SHIPMENT_EXIST": "Do you have a shipment ready?",
"DOES_SHIPMENT_EXIST_HELP": "Please provide the reference of a shipment that is ready to ship.",
"DUELY_RECEIVED_BY": "Duely received by",
"EDIT": "Edit",
"EDIT_CONTAINER": "Edit Container",
"EDIT_SHIPMENT": "Edit Shipment",
"EMPTY_WEIGHT": "Empty weight",
"ENTER_SHIPMENT_PROGRESS": "Please enter the shipment progress status. Include the current shipment location if it has changed.",
"ENTER_SHIPMENT_PROGRESS_HELP_TEXT": "Ex. RECEPTION - IMA GOMA WAREHOUSE, GOMA",
"ENTER_STOCK_FOR_SHIPMENT" : "Enter stock for this shipment",
Expand All @@ -55,8 +61,10 @@
"EXISTING_SHIPMENT_AT_DEPOT": "Current shipment in the depot ({{number}})",
"EXIT_STOCK_FOR_SHIPMENT" : "Exit stock for this shipment",
"IS_IN_TRANSIT_TOOLTIP": "This inventory is in transit to the depot ({{depot}})",
"ITEMS": "Item(s)",
"LOCATION": "Location",
"LOT_CONDITION": "Condition",
"MANIFEST": "Manifest",

"MARKED_DELIVERED": "Shipment marked delivered",
"MARK_DELIVERED": "Mark as delivered",
Expand All @@ -78,8 +86,9 @@
"NEW_LOCATION": "New Location",
"NEW_SHIPMENT": "New Shipment",
"NOT_DEFINED": "Not Defined",
"NUM_ITEMS": "Num. Items",
"ORIGIN_DEPOT": "Origin depot",
"OVERVIEW": "Shipment Overview",
"OVERVIEW": "Overview",
"PACKING": "Packing",
"PACKING_LIST": "Packing List",
"PACKING_LIST_UPDATED": "Packing list updated",
Expand All @@ -93,6 +102,8 @@
"SHIPMENTS": "Shipments",
"SHIPMENT_CREATED": "Shipment created",
"SHIPMENT_DATE": "Expedition",
"SHIPMENT_DOCUMENT": "Shipment Document",
"SHIPMENT_MANIFEST": "Shipment Manifest",
"SHIPMENT_LOCATION_TRACKING": "Locations Tracking",
"SHIPMENT_REFERENCE": "Shipment Reference",
"SHIPMENT_REGISTRY": "Shipment Registry",
Expand All @@ -105,8 +116,9 @@
"TITLE" : "Shipment",
"TOTAL_COST": "Total cost",
"TOTAL_QUANTITY": "Total quantity",
"TOTAL_VALUE": "Total Value",
"TOTAL_WEIGHT": "Total weight",
"TRACKING_LOG": "Tracking Log",
"TRACKING_LOG": "Update Tracking Log",
"TRANSPORTER": "Transporter",
"TRANSPORT_MODE": "Mode of Transport",
"UPDATED": "Shipment successfully updated",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@
"TOTAL_PAID": "Total payé",
"TOTAL_SELECTED_INVOICES": "Total des factures selectionnées",
"TOTAL_SELECTED_SALARIES": "Total des salaires selectionnés",
"TOTAL_WEIGHT": "Poids total",
"TOTAL": "Total",
"TRANSACTION_DATE": "Date de Transaction",
"TRANSACTION": "Transaction",
Expand Down
16 changes: 14 additions & 2 deletions client/src/i18n/fr/shipment.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,31 @@
"SACK": "sac",
"SET": "jeu"
},
"CONTAINER_WEIGHT": "Poids (conteneur seulement, pas le contenu)",
"CREATE": "Créer",
"CREATED": "Expédition créee avec succès",
"CREATED_BY": "Crée par",
"CURRENT_DEPOT": "Dépôt en cours",
"CURRENT_LOCATION": "Localisation en cours",
"CURRENT_STATUS": "Etat actuel",
"CONTAINER_WEIGHT_EMPTY": "Poids du conteneur (vide)",
"CONTAINER_WEIGHT_PACKED": "Poids du conteneur (emballé)",
"CONTAINER_VALUE": "Valeur du conteneur",
"DATE_DELIVERED": "Date de livraison",
"DATE_PACKED": "Date colisage",
"DATE_SENT": "Date d'envoi",
"DELETE": "Supprimer",
"DELETED": "Expédition supprimée avec succès",
"DELIVERY_EXPECTED_ON": "Livraison attendue le",
"DESTINATION_DEPOT": "Dépôt de destination",
"DOCUMENT": "Document d'expédition",
"DOES_SHIPMENT_EXIST": "Avez-vous une expédition prête ?",
"DOES_SHIPMENT_EXIST_HELP": "Veuillez renseigner la référence de l'expédition prête",
"DUELY_RECEIVED_BY": "Pour réception conformé",
"EDIT": "Editer",
"EDIT_CONTAINER": "Modifier conteneur",
"EDIT_SHIPMENT": "Modifier expédition",
"EMPTY_WEIGHT": "Poids à vide",
"ENTER_SHIPMENT_PROGRESS": "Veuillez entrer l'etat de progression de l'expédition avec sa localisation actuelle",
"ENTER_SHIPMENT_PROGRESS_HELP_TEXT": "Ex. RECEPTION - IMA GOMA WAREHOUSE, GOMA",
"ENTER_STOCK_FOR_SHIPMENT" : "Entrer le stock pour cette expédition",
Expand All @@ -55,8 +61,10 @@
"EXISTING_SHIPMENT_AT_DEPOT": "Les expéditions en cours dans le dépôt ({{number}})",
"EXIT_STOCK_FOR_SHIPMENT" : "Sortir du stock pour cette expédition",
"IS_IN_TRANSIT_TOOLTIP": "Cet inventaire est en transit vers le depot ({{depot}})",
"ITEMS": "Article(s)",
"LOCATION": "Localisation",
"LOT_CONDITION": "Condition",
"MANIFEST": "Manifeste",

"MARKED_DELIVERED": "Expédition marquée livrée",
"MARK_DELIVERED": "Marquer comme livré",
Expand All @@ -78,8 +86,9 @@
"NEW_LOCATION": "Nouvelle localisation",
"NEW_SHIPMENT": "Nouvelle expédition",
"NOT_DEFINED": "Non-défini",
"NUM_ITEMS": "N. des items",
"ORIGIN_DEPOT": "Dépôt d'origine",
"OVERVIEW": "Aperçu de l'expédition",
"OVERVIEW": "Aperçu",
"PACKING": "Colisage",
"PACKING_LIST": "Liste de colisage",
"PACKING_LIST_UPDATED": "Liste de colisage mise à jour",
Expand All @@ -93,6 +102,8 @@
"SHIPMENTS": "Expéditions",
"SHIPMENT_CREATED": "Expédition créée",
"SHIPMENT_DATE": "Date de l'expédition",
"SHIPMENT_DOCUMENT": "Document d'expédition",
"SHIPMENT_MANIFEST": "Manifeste d'expédition",
"SHIPMENT_LOCATION_TRACKING": "Suivi des emplacements",
"SHIPMENT_REFERENCE": "Référence Expédition",
"SHIPMENT_REGISTRY": "Registre des expéditions",
Expand All @@ -105,8 +116,9 @@
"TITLE" : "Expedition",
"TOTAL_COST": "Côut total",
"TOTAL_QUANTITY": "Quantité totale",
"TOTAL_VALUE": "Valeur totale",
"TOTAL_WEIGHT": "Poids total",
"TRACKING_LOG": "Journal de suivi",
"TRACKING_LOG": "Mettre à jour le journal de suivi",
"TRANSPORTER": "Transporteur",
"TRANSPORT_MODE": "Mode de transport",
"UPDATED": "Expédition mis à jour avec succès",
Expand Down
16 changes: 12 additions & 4 deletions client/src/js/services/receipts/ReceiptService.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ function ReceiptService($http, util, Language, AppCache, Session) {
service.payrollReport = payrollReport;
service.displayData = displayData;

service.shipmentOverview = shipmentOverview;
service.shipmentDocument = shipmentDocument;
service.shipmentManifest = shipmentManifest;
service.shipmentBarcode = shipmentBarcode;

/**
Expand Down Expand Up @@ -171,10 +172,17 @@ function ReceiptService($http, util, Language, AppCache, Session) {
return fetch(route, options);
}

// shipment overview
function shipmentOverview(uuid, options) {
// shipment document
function shipmentDocument(uuid, options) {
options.posReceipt = service.posReceipt;
const route = `/reports/shipments/${uuid}/overview`;
const route = `/reports/shipments/${uuid}/document`;
return fetch(route, options);
}

// shipment manifest
function shipmentManifest(uuid, options) {
options.posReceipt = service.posReceipt;
const route = `/reports/shipments/${uuid}/document?manifest=1`;
return fetch(route, options);
}

Expand Down
4 changes: 4 additions & 0 deletions client/src/modules/inventory/inventory.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ function InventoryService(
function remove(uuid) {
return service.$http.delete('/inventory/metadata/'.concat(uuid));
}

service.columnsMap = (key) => {
const cols = {
code : 'FORM.LABELS.CODE',
Expand All @@ -229,6 +230,9 @@ function InventoryService(
inventoryUnit : 'FORM.LABELS.UNIT',
unit_volume : 'FORM.LABELS.VOLUME',
unit_weight : 'FORM.LABELS.WEIGHT',
is_asset : 'FORM.LABELS.ASSET',
manufacturer_brand : 'FORM.LABELS.MANUFACTURER_BRAND',
manufacturer_model : 'FORM.LABELS.MANUFACTURER_MODEL',
};

return cols[key] || key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RequiredInventoryScansRegistryController.$inject = [
'RequiredInventoryScansService', 'RequiredInventoryScansRegistryService',
'StockModalService', 'DepotService',
'GridStateService', 'GridColumnService', 'GridGroupingService',
'NotifyService', '$state',
'NotifyService', '$state', '$translate',
];

/**
Expand All @@ -16,7 +16,7 @@ function RequiredInventoryScansRegistryController(
RequiredInventoryScans, ReqInvScansRegistryService,
StockModal, Depots,
GridState, Columns, Grouping,
Notify, $state,
Notify, $state, $translate,
) {
const vm = this;
const cacheKey = 'required-inventory-scans-grid';
Expand All @@ -26,6 +26,7 @@ function RequiredInventoryScansRegistryController(
appScopeProvider : vm,
enableColumnMenus : false,
columnDefs : ReqInvScansRegistryService.columnDefs,
groupingNullLabel : $translate.instant('DEPOT.ALL_DEPOTS'),
enableSorting : true,
showColumnFooter : true,
fastWatch : true,
Expand Down Expand Up @@ -71,8 +72,6 @@ function RequiredInventoryScansRegistryController(
vm.latestViewFilters = vm.filters.formatView();
}

// { key : 'period', value : 'allTime', displayValue : 'PERIODS.ALL_TIME', cacheable: false },

// load the assets scans into the grid
function load(filters) {
if (vm.defaultDepot) {
Expand Down
8 changes: 4 additions & 4 deletions client/src/modules/shipment/create-shipment.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ <h4 translate>STOCK.PRODUCT_NOT_AVAILABLE</h4>
<tr>
<th translate>FORM.LABELS.LABEL</th>
<th translate>FORM.LABELS.TYPE</th>
<th translate>FORM.LABELS.WEIGHT</th>
<th></th>
<th></th>
<th></th>
Expand All @@ -256,6 +257,7 @@ <h4 translate>STOCK.PRODUCT_NOT_AVAILABLE</h4>
<tr ng-repeat="cont in CreateShipCtrl.containers">
<td>{{cont.label}}</td>
<td>{{cont.container_type}}</td>
<td>{{cont.weight}}</td>
<td>
<a href ng-click="CreateShipCtrl.editContainer(cont)">
<span class="fa fa-edit"></span> <span translate>FORM.LABELS.EDIT</span>
Expand Down Expand Up @@ -291,10 +293,8 @@ <h4 translate>STOCK.PRODUCT_NOT_AVAILABLE</h4>
ui-grid-auto-resize
ui-grid-resize-columns>
<bh-grid-loading-indicator
loading-state="CreateShipCtrl.stockForm.isLoading()"
empty-state="CreateShipCtrl.emptyStock"
error-state="CreateShipCtrl.hasError"
empty-state-message="STOCK.EMPTY">
loading-state="CreateShipCtrl.stockForm.isLoading() || CreateShipCtrl.loading"
error-state="CreateShipCtrl.hasError">
</bh-grid-loading-indicator>
</div>

Expand Down

0 comments on commit 1217ad6

Please sign in to comment.