diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0afa66662..0944833f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,8 @@ Ce projet adhère au principe du [Semantic Versioning](https://semver.org/spec/v
(Un lien symbolique est utilisé côté serveur pour relier les deux côtés de l'application)
- Corrige l'hôte de développement et permet sa customisation via une variable d'environnement.
- Améliorations internes de la validation des données.
+- Ajoute une page de vue du matériel en détail.
+- Utilise des onglets dans la page de vue du matériel.
## 0.10.2 (2020-11-16)
diff --git a/client/src/components/MaterialTags/MaterialTags.scss b/client/src/components/MaterialTags/MaterialTags.scss
new file mode 100644
index 000000000..7686f164f
--- /dev/null
+++ b/client/src/components/MaterialTags/MaterialTags.scss
@@ -0,0 +1,15 @@
+.MaterialTags {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ padding: 0;
+ margin: 0;
+
+ &__item {
+ list-style: none;
+ padding: .3rem .5rem;
+ margin: 0 .35rem .35rem 0;
+ background: $bg-color-emphasis;
+ border-radius: 10px;
+ }
+}
diff --git a/client/src/components/MaterialTags/MaterialTags.vue b/client/src/components/MaterialTags/MaterialTags.vue
new file mode 100644
index 000000000..daa55a04f
--- /dev/null
+++ b/client/src/components/MaterialTags/MaterialTags.vue
@@ -0,0 +1,26 @@
+
+ {{ material.description }}
+ {{ $t('material-not-displayed-on-bill') }}
+
+ {{ $t('material-is-discountable') }}
+ {{ material.note }} {{ $t('category') }}: {{ categoryName }}
+ {{ $t('sub-category') }}: {{ subCategoryName }}
+ {{ $t('created-at') }} {{ createDate }} {{ $t('updated-at') }} {{ updateDate }}
+
+
+
+
+
+
diff --git a/client/src/locale/en/common.js b/client/src/locale/en/common.js
index 78739ee0a..963d9428d 100644
--- a/client/src/locale/en/common.js
+++ b/client/src/locale/en/common.js
@@ -8,6 +8,7 @@ export default {
'action-add': "Add",
'action-edit': "Edit",
+ 'action-view': "Display details",
'action-trash': "Trash bin",
'action-restore': "Restore",
'action-delete': "Delete",
@@ -78,21 +79,28 @@ export default {
'ref': "Ref.",
'reference': "Reference",
'park': "Park",
+ 'prices': "Prices",
'rental-price': "Rental price",
'replacement-price': "Replacement price",
'rent-price': "Rent. price",
'repl-price': "Repl. price",
+ 'value-per-day': '{value}\u00a0/\u00a0day',
'serial-number': "Serial n°",
'quantity': "Stock qty",
+ 'quantities': "Quantities",
'quantity-out-of-order': "Out of order qty",
'discountable': "Discountable?",
+ 'material-is-discountable': "The material is «\u0a00discountable\u00a0»: a discount amount can be applied to this material.",
'hidden-on-bill': "Hidden on bill?",
+ 'material-not-displayed-on-bill': "The material is not displayed on bills.",
'price-must-be-zero': "the rental price must be 0",
'all-parks': "All parks combined",
'all-categories': "All categories",
'all-sub-categories': "All sub-categories",
'open-trash-bin': "Display trash bin",
'display-not-deleted-items': "Display not deleted items",
+ 'created-at': "Created at:",
+ 'updated-at': "Updated at:",
'event-details': "Event's details",
'title': "Title",
@@ -147,6 +155,7 @@ export default {
"{count} items",
],
'stock-items-count': "{count} in stock",
+ 'out-of-order-items-count': "{count} out of order",
'sub-total': "Sub-total",
'total-amount': "Total amount",
'total-amount-with-discount': "Total with discount",
diff --git a/client/src/locale/en/pages.js b/client/src/locale/en/pages.js
index e05ad4106..33c9067e7 100644
--- a/client/src/locale/en/pages.js
+++ b/client/src/locale/en/pages.js
@@ -137,6 +137,7 @@ export default {
'add': "New material",
'edit': "Modify material «\u00a0{pageSubTitle}\u00a0»",
'help-edit': "Give a short name, and use the description field to detail the material if needed.",
+ 'view': "Details of material «\u00a0{pageSubTitle}\u00a0»",
'confirm-delete': "Move this material in trash bin?",
'confirm-permanently-delete': "Do you really want to permanently delete this material?",
'confirm-restore': "Do you really want to restore this material?",
diff --git a/client/src/locale/fr/common.js b/client/src/locale/fr/common.js
index 509ff0bdc..40e18c70d 100644
--- a/client/src/locale/fr/common.js
+++ b/client/src/locale/fr/common.js
@@ -8,6 +8,7 @@ export default {
'action-add': "Ajouter",
'action-edit': "Modifier",
+ 'action-view': "Afficher en détail",
'action-trash': "Corbeille",
'action-restore': "Restaurer",
'action-delete': "Supprimer",
@@ -78,21 +79,28 @@ export default {
'ref': "Réf.",
'reference': "Référence",
'park': "Parc",
+ 'prices': "Tarifs",
'rental-price': "Tarif location",
'replacement-price': "Prix de remplacement",
'rent-price': "Tarif loc.",
'repl-price': "Val. rempl.",
+ 'value-per-day': '{value}\u00a0/\u00a0jour',
'serial-number': "N° de série",
'quantity': "Qté stock",
+ 'quantities': "Quantités",
'quantity-out-of-order': "Qté en panne",
'discountable': "Remisable\u00a0?",
+ 'material-is-discountable': "Le matériel est «\u00a0remisable\u00a0»\u00a0: une remise peut être appliquée sur ce matériel.",
'hidden-on-bill': "Caché sur la facture\u00a0?",
+ 'material-not-displayed-on-bill': "Le matériel n'est pas affiché sur les factures.",
'price-must-be-zero': "le tarif de location doit être égal à 0",
'all-parks': "Tous parcs confondus",
'all-categories': "Toutes catégories",
'all-sub-categories': "Toutes sous-catégories",
'open-trash-bin': "Afficher la corbeille",
'display-not-deleted-items': "Afficher les enregistrements non supprimés",
+ 'created-at': "Créé le\u00a0:",
+ 'updated-at': "Modifié le\u00a0:",
'event-details': "Détails de l'événement",
'title': "Titre",
@@ -147,6 +155,7 @@ export default {
"{count} articles",
],
'stock-items-count': "{count} en stock",
+ 'out-of-order-items-count': "{count} en panne",
'sub-total': "Sous-total",
'total-amount': "Montant total",
'total-amount-with-discount': "Total après remise",
diff --git a/client/src/locale/fr/pages.js b/client/src/locale/fr/pages.js
index 5de64119d..d240f025a 100644
--- a/client/src/locale/fr/pages.js
+++ b/client/src/locale/fr/pages.js
@@ -137,6 +137,7 @@ export default {
'add': "Nouveau matériel",
'edit': "Modifier le matériel «\u00a0{pageSubTitle}\u00a0»",
'help-edit': "Trouvez un nom assez court, et utilisez plutôt la description pour détailler le matériel si besoin.",
+ 'view': "Détails du matériel «\u00a0{pageSubTitle}\u00a0»",
'confirm-delete': "Mettre ce matériel à la corbeille\u00a0?",
'confirm-permanently-delete': "Voulez-vous vraiment supprimer définitivement ce matériel\u00a0?",
'confirm-restore': "Voulez-vous vraiment restaurer ce matériel\u00a0?",
diff --git a/client/src/pages/Material/index.js b/client/src/pages/Material/index.js
index 4a9866401..4be460277 100644
--- a/client/src/pages/Material/index.js
+++ b/client/src/pages/Material/index.js
@@ -149,7 +149,7 @@ export default {
this.setMaterialData(data);
setTimeout(() => {
- this.$router.push('/materials');
+ this.$router.push(`/materials/${data.id}/view`);
}, 300);
})
.catch(this.displayError);
diff --git a/client/src/pages/MaterialView/Infos/Attributes/Attributes.scss b/client/src/pages/MaterialView/Infos/Attributes/Attributes.scss
new file mode 100644
index 000000000..c1686ec51
--- /dev/null
+++ b/client/src/pages/MaterialView/Infos/Attributes/Attributes.scss
@@ -0,0 +1,11 @@
+.MaterialViewInfosAttributes {
+ &__list {
+ &__item {
+ margin-bottom: .3rem;
+
+ &__value {
+ font-weight: 700;
+ }
+ }
+ }
+}
diff --git a/client/src/pages/MaterialView/Infos/Attributes/Attributes.vue b/client/src/pages/MaterialView/Infos/Attributes/Attributes.vue
new file mode 100644
index 000000000..9014ec04b
--- /dev/null
+++ b/client/src/pages/MaterialView/Infos/Attributes/Attributes.vue
@@ -0,0 +1,44 @@
+
+ {{ $t('special-attributes') }}
+
+
+
+ {{ material.reference }}
+
+
+
+ {{ $t('quantities') }}
+
+
+ {{ $t('prices') }}
+
+
+ {{ $t('billing') }}
+ {{ $t('notes') }}
+