-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 2dc074a Author: Paul Maillardet <paul@pulsanova.com> Date: Tue Jan 5 11:47:59 2021 +0100 Ajoute des onglets dans la vue du matériel en détail (#82) * Ajoute des onglets dans la vue du matériel en détail * Renomme le Dotfile de développement * Supprime l'affichage des unités dans la vue d'un matériel Co-authored-by: Donovan Lambert <donovan@pulsanova.com> commit 27e467d Merge: d318c40 0b8c817 Author: Paul Maillardet <paul@pulsanova.com> Date: Mon Jan 4 21:37:03 2021 +0100 Merge pull request #80 from Robert-2/feature/material-view Ajoute la vue d'un matériel commit 0b8c817 Author: Paul Maillardet <paul@pulsanova.com> Date: Sun Jan 3 22:27:42 2021 +0100 Corrige selon review commit 33cdf3d Author: Paul Maillardet <paul@pulsanova.com> Date: Thu Dec 31 02:42:06 2020 +0100 Ajoute la vue d'un matériel commit d318c40 Merge: 985126a 3053393 Author: Paul Maillardet <paul@pulsanova.com> Date: Sat Jan 2 23:18:58 2021 +0100 Merge pull request #81 from Robert-2/feature/improves-validation-2 Améliore (encore) la validation commit 3053393 Author: Donovan Lambert <donovan@pulsanova.com> Date: Fri Jan 1 16:35:37 2021 +0100 Corrige les tests unitaires vu la nouvelle année (2021) commit 37149e4 Author: Donovan Lambert <donovan@pulsanova.com> Date: Fri Jan 1 16:14:05 2021 +0100 Améliore (encore) la validation commit 985126a Merge: acbb5cf de0bcb8 Author: Paul Maillardet <paul@pulsanova.com> Date: Wed Dec 30 14:04:04 2020 +0100 Merge pull request #79 from Robert-2/feature/remove-partial-validation Améliore la validation des modèles commit de0bcb8 Author: Donovan Lambert <donovan@pulsanova.com> Date: Wed Dec 30 12:25:45 2020 +0100 Corrige la validation des modèles commit 57993a9 Author: Donovan Lambert <donovan@pulsanova.com> Date: Tue Dec 29 18:56:47 2020 +0100 Amélioration des booléens dans les fixtures commit acbb5cf Author: Donovan <donovan@pulsanova.com> Date: Tue Dec 29 17:27:42 2020 +0100 Améliore la validation (+ Refactoring modèles) (#76) commit f0bbab2 Author: Donovan <donovan@pulsanova.com> Date: Tue Dec 29 11:25:22 2020 +0100 Ajuste la contrainte des unités de matériel dans les événements (#77) (Sera rollback lorsque l'on prendra en charge les guards lors du switch-back Gestion unitaire => Gestion non unitaire)
- Loading branch information
Showing
24 changed files
with
479 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<ul class="MaterialTags"> | ||
<li | ||
v-for="tag in tags" | ||
:key="tag.id" | ||
class="MaterialTags__item" | ||
> | ||
<i class="fas fa-tag" /> | ||
{{ tag.name }} | ||
</li> | ||
</ul> | ||
</template> | ||
|
||
<style lang="scss"> | ||
@import '../../themes/default/index'; | ||
@import './MaterialTags'; | ||
</style> | ||
|
||
<script> | ||
export default { | ||
name: 'MaterialTags', | ||
props: { | ||
tags: Array, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
client/src/pages/MaterialView/Infos/Attributes/Attributes.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.MaterialViewInfosAttributes { | ||
&__list { | ||
&__item { | ||
margin-bottom: .3rem; | ||
|
||
&__value { | ||
font-weight: 700; | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
client/src/pages/MaterialView/Infos/Attributes/Attributes.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<template> | ||
<div class="MaterialViewInfosAttributes"> | ||
<h3>{{ $t('special-attributes') }}</h3> | ||
<ul | ||
class="MaterialViewInfosAttributes__list" | ||
v-if="attributes.length > 0" | ||
> | ||
<li | ||
class="MaterialViewInfosAttributes__list__item" | ||
v-for="attribute in attributes" | ||
:key="attribute.id" | ||
> | ||
{{ attribute.name }}: | ||
<span | ||
v-if="attribute.type !== 'boolean'" | ||
class="MaterialViewInfosAttributes__list__item__value" | ||
> | ||
{{ attribute.value }} | ||
{{ attribute.unit }} | ||
</span> | ||
<span | ||
v-if="attribute.type === 'boolean'" | ||
class="MaterialViewInfosAttributes__list__item__value" | ||
> | ||
{{ attribute.value ? $t('yes') : $t('no') }} | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
@import '../../../../themes/default/index'; | ||
@import './Attributes'; | ||
</style> | ||
|
||
<script> | ||
export default { | ||
name: 'MaterialViewInfosAttributes', | ||
props: { | ||
attributes: { required: true, type: Array }, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.MaterialViewInfos { | ||
display: flex; | ||
flex-wrap: wrap; | ||
|
||
&__main { | ||
flex: 2; | ||
min-width: 250px; | ||
margin-right: 3rem; | ||
} | ||
|
||
&__extras { | ||
flex: 1; | ||
min-width: 250px; | ||
padding: 1rem 0 0; | ||
} | ||
|
||
&__rental-price, | ||
&__stock-quantity { | ||
font-weight: 700; | ||
margin-bottom: .3rem; | ||
} | ||
|
||
&__out-of-order { | ||
color: $text-danger-color; | ||
} | ||
|
||
&__categories { | ||
margin: 1.5rem 0; | ||
} | ||
|
||
&__dates { | ||
color: $text-light-color; | ||
margin-top: 1.5rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<template> | ||
<div class="MaterialViewInfos"> | ||
<section class="MaterialViewInfos__main"> | ||
<h2> | ||
{{ material.reference }} | ||
</h2> | ||
<h3> | ||
<router-link :to="`/materials?${queryStringCategory}`"> | ||
{{ categoryName }} | ||
</router-link> | ||
<span v-if="subCategoryName">/</span> | ||
<router-link | ||
:to="`/materials?${queryStringSubCategory}`" | ||
v-if="subCategoryName" | ||
> | ||
{{ subCategoryName }} | ||
</router-link> | ||
/ | ||
{{ material.name }} | ||
</h3> | ||
<p>{{ material.description }}</p> | ||
<h3>{{ $t('quantities') }}</h3> | ||
<ul> | ||
<li class="MaterialViewInfos__stock-quantity"> | ||
{{ $t('stock-items-count', { count: material.stock_quantity || 0 }) }} | ||
</li> | ||
<li | ||
v-if="material.out_of_order_quantity > 0" | ||
class="MaterialViewInfos__out-of-order" | ||
> | ||
{{ $t('out-of-order-items-count', { count: material.out_of_order_quantity || 0 }) }} | ||
</li> | ||
</ul> | ||
<div class="MaterialViewInfos__billing" v-if="showBilling"> | ||
<h3>{{ $t('prices') }}</h3> | ||
<ul> | ||
<li class="MaterialViewInfos__rental-price"> | ||
{{ $t('value-per-day', { value: rentalPrice }) }} | ||
</li> | ||
<li v-if="replacementPrice"> | ||
{{ $t('replacement-price') }} {{ replacementPrice }} | ||
</li> | ||
</ul> | ||
<h3>{{ $t('billing') }}</h3> | ||
<p v-if="material.is_hidden_on_bill"> | ||
{{ $t('material-not-displayed-on-bill') }} | ||
</p> | ||
<p v-if="material.is_discountable"> | ||
{{ $t('material-is-discountable') }} | ||
</p> | ||
</div> | ||
<Attributes | ||
v-if="material.attributes.length > 0" | ||
:attributes="material.attributes" | ||
/> | ||
<div class="MaterialViewInfos__notes" v-if="material.note"> | ||
<h3>{{ $t('notes') }}</h3> | ||
<p>{{ material.note }}</p> | ||
</div> | ||
</section> | ||
<section class="MaterialViewInfos__extras"> | ||
<div class="MaterialViewInfos__actions"> | ||
<router-link | ||
v-tooltip="$t('action-edit')" | ||
:to="`/materials/${material.id}`" | ||
tag="button" | ||
class="info" | ||
> | ||
<i class="fas fa-edit" /> | ||
{{ $t('action-edit') }} | ||
</router-link> | ||
</div> | ||
<div class="MaterialViewInfos__categories"> | ||
<p>{{ $t('category') }}: <strong>{{ categoryName }}</strong></p> | ||
<p v-if="subCategoryName"> | ||
{{ $t('sub-category') }}: <strong>{{ subCategoryName }}</strong> | ||
</p> | ||
</div> | ||
<MaterialTags :tags="material.tags" /> | ||
<div class="MaterialViewInfos__dates"> | ||
<p>{{ $t('created-at') }} {{ createDate }}</p> | ||
<p>{{ $t('updated-at') }} {{ updateDate }}</p> | ||
</div> | ||
</section> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
@import '../../../themes/default/index'; | ||
@import './Infos'; | ||
</style> | ||
|
||
<script src="./index.js"></script> |
Oops, something went wrong.