Skip to content

Commit

Permalink
feat(price create form): add green check marks next to filled in cards
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jan 22, 2024
1 parent e547914 commit a337052
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
15 changes: 12 additions & 3 deletions src/views/AddPriceMultiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
<v-col cols="12" md="6" lg="4">
<v-card
:title="$t('AddPriceMultiple.ProofDetails.Title')"
:prepend-icon="proofFormFilled ? (proofType === 'RECEIPT' ? 'mdi-receipt-text-check-outline' : 'mdi-library-shelves') : (proofType === 'RECEIPT' ? 'mdi-receipt-text-outline' : 'mdi-library-shelves')"
:prepend-icon="(proofType === 'RECEIPT') ? 'mdi-receipt-text-outline' : 'mdi-library-shelves'"
height="100%"
:style="proofFormFilled ? 'border: 1px solid #4CAF50' : 'border: 1px solid transparent'">
<template v-slot:append v-if="proofFormFilled">
<v-icon icon="mdi-checkbox-marked-circle" color="success"></v-icon>
</template>
<v-divider></v-divider>
<v-card-text>
<v-row>
Expand Down Expand Up @@ -54,9 +57,12 @@
<v-col cols="12" md="6" lg="4">
<v-card
:title="$t('AddPriceSingle.WhereWhen.Title')"
:prepend-icon="locationDateFormFilled ? 'mdi-map-marker-check-outline' : 'mdi-map-marker-outline'"
prepend-icon="mdi-map-marker-outline"
height="100%"
:style="locationDateFormFilled ? 'border: 1px solid #4CAF50' : 'border: 1px solid transparent'">
<template v-slot:append v-if="locationDateFormFilled">
<v-icon icon="mdi-checkbox-marked-circle" color="success"></v-icon>
</template>
<v-divider></v-divider>
<v-card-text>
<h3 class="mb-1">{{ $t('AddPriceSingle.WhereWhen.Location') }}</h3>
Expand All @@ -65,7 +71,7 @@
:style="isSelectedLocation(location) ? 'border: 1px solid #4CAF50' : 'border: 1px solid transparent'"
v-for="location in recentLocations"
@click="setLocationData(location)">
<v-icon start :icon="isSelectedLocation(location) ? 'mdi-checkbox-marked-circle' : 'mdi-history'" :color="isSelectedLocation(location) ? 'green' : ''"></v-icon>
<v-icon start :icon="isSelectedLocation(location) ? 'mdi-check-circle-outline' : 'mdi-history'" :color="isSelectedLocation(location) ? 'green' : ''"></v-icon>
{{ getNominatimLocationTitle(location, true, true, true) }}
</v-chip>
<br v-if="recentLocations.length" />
Expand Down Expand Up @@ -94,6 +100,9 @@
prepend-icon="mdi-tag-check-outline"
height="100%"
style="border: 1px solid #4CAF50">
<template v-slot:append>
<v-icon icon="mdi-checkbox-marked-circle" color="success"></v-icon>
</template>
<v-divider></v-divider>
<v-card-text>
<v-row>
Expand Down
17 changes: 13 additions & 4 deletions src/views/AddPriceSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
<v-col cols="12" md="6" lg="4">
<v-card
:title="$t('AddPriceSingle.ProductInfo.Title')"
:prepend-icon="productFormFilled ? 'mdi-database-check-outline' : 'mdi-database-outline'"
prepend-icon="mdi-database-outline"
height="100%"
:style="productFormFilled ? 'border: 1px solid #4CAF50' : 'border: 1px solid transparent'">
<template v-slot:append v-if="productFormFilled">
<v-icon icon="mdi-checkbox-marked-circle" color="success"></v-icon>
</template>
<v-divider></v-divider>
<v-card-text>
<h3 class="mb-2">
Expand Down Expand Up @@ -83,9 +86,12 @@
<v-col cols="12" md="6" lg="4">
<v-card
:title="$t('AddPriceSingle.PriceDetails.Title')"
:prepend-icon="priceProofFormFilled ? 'mdi-tag-check-outline' : 'mdi-tag-outline'"
prepend-icon="mdi-tag-outline"
height="100%"
:style="priceProofFormFilled ? 'border: 1px solid #4CAF50' : 'border: 1px solid transparent'">
<template v-slot:append v-if="priceProofFormFilled">
<v-icon icon="mdi-checkbox-marked-circle" color="success"></v-icon>
</template>
<v-divider></v-divider>
<v-card-text>
<h3 class="mb-1">
Expand Down Expand Up @@ -161,9 +167,12 @@
<v-col cols="12" md="6" lg="4">
<v-card
:title="$t('AddPriceSingle.WhereWhen.Title')"
:prepend-icon="locationDateFormFilled ? 'mdi-map-marker-check-outline' : 'mdi-map-marker-outline'"
prepend-icon="mdi-map-marker-outline"
height="100%"
:style="locationDateFormFilled ? 'border: 1px solid #4CAF50' : 'border: 1px solid transparent'">
<template v-slot:append v-if="locationDateFormFilled">
<v-icon icon="mdi-checkbox-marked-circle" color="success"></v-icon>
</template>
<v-divider></v-divider>
<v-card-text>
<h3 class="mb-1">{{ $t('AddPriceSingle.WhereWhen.Location') }}</h3>
Expand All @@ -172,7 +181,7 @@
:style="isSelectedLocation(location) ? 'border: 1px solid #4CAF50' : 'border: 1px solid transparent'"
v-for="location in recentLocations"
@click="setLocationData(location)">
<v-icon start :icon="isSelectedLocation(location) ? 'mdi-checkbox-marked-circle' : 'mdi-history'" :color="isSelectedLocation(location) ? 'green' : ''"></v-icon>
<v-icon start :icon="isSelectedLocation(location) ? 'mdi-check-circle-outline' : 'mdi-history'" :color="isSelectedLocation(location) ? 'green' : ''"></v-icon>
{{ getNominatimLocationTitle(location, true, true, true) }}
</v-chip>
<br v-if="recentLocations.length" />
Expand Down

0 comments on commit a337052

Please sign in to comment.