Skip to content

Commit

Permalink
refactor(price add): reorganise a bit the price add workflow (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Jul 1, 2024
1 parent cbbfe1a commit 7d0a8d2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run release-please

on:
push:
branches:
Expand Down
9 changes: 6 additions & 3 deletions src/components/ProofInputRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
<span class="d-sm-none">{{ $t('AddPriceSingle.PriceDetails.Gallery') }}</span>
<span class="d-none d-sm-inline-flex">{{ $t('AddPriceSingle.PriceDetails.SelectFromGallery') }}</span>
</v-btn>
<v-btn v-if="!hideRecentProofChoice" class="mb-2" size="small" prepend-icon="mdi-receipt-text-clock" @click="userRecentProofsDialog = true">
<v-btn
v-if="!hideRecentProofChoice" class="mb-2" size="small" prepend-icon="mdi-receipt-text-clock" :loading="loading"
:disabled="loading" @click="userRecentProofsDialog = true"
>
<span class="d-sm-none">{{ $t('AddPriceSingle.PriceDetails.RecentProof') }}</span>
<span class="d-none d-sm-inline-flex">{{ $t('AddPriceSingle.PriceDetails.SelectRecentProof') }}</span>
</v-btn>
Expand Down Expand Up @@ -58,9 +61,9 @@
<ProofDateCurrencyInputRow :proofDateCurrencyForm="proofForm" />

<!-- proof upload button -->
<v-row v-if="proofFormImage">
<v-row>
<v-col>
<v-btn color="success" :loading="loading" :disabled="!proofFormFilled" @click="uploadProof">
<v-btn color="success" :loading="loading" :disabled="!proofFormFilled || loading" @click="uploadProof">
{{ $t('Common.Upload') }}
</v-btn>
</v-col>
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserRecentProofsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<v-card-text>
<v-row>
<v-col v-for="proof in userProofList" :key="proof" cols="12" sm="6" md="3">
<v-col v-for="proof in userProofList" :key="proof" cols="12" md="6" lg="4">
<ProofCard :proof="proof" :hideProofHeader="true" :hideProofActions="true" :readonly="true" :isSelectable="true" @proofSelected="selectProof" />
</v-col>
</v-row>
Expand Down
17 changes: 7 additions & 10 deletions src/views/AddPriceMultiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
</v-card>
</v-col>

<!-- Step 2a: product prices already uploaded -->
<v-col cols="12" md="6">
<v-col v-if="proofFormFilled" cols="12" md="6">
<!-- Step 2a: product prices already uploaded -->
<v-card
class="mb-4"
prepend-icon="mdi-tag-check-outline"
height="100%"
style="border: 1px solid #4CAF50"
>
<template #title>
Expand All @@ -50,12 +50,10 @@
</v-card-text>
<v-overlay v-model="disablePriceAlreadyUploadedCard" scrim="#E8F5E9" contained persistent />
</v-card>
</v-col>

<!-- Step 2b: new product price form -->
<v-col cols="12" md="6">
<!-- Step 2b: new product price form -->
<v-btn
v-if="!Object.keys(productPriceForm).length && !productPriceUploadedList.length"
v-if="!Object.keys(productPriceForm).length"
class="mr-2"
prepend-icon="mdi-plus"
color="primary"
Expand All @@ -69,7 +67,6 @@
<v-card
:title="$t('AddPriceMultiple.ProductPriceDetails.NewPrice')"
prepend-icon="mdi-tag-outline"
append-icon="mdi-delete"
height="100%"
style="border: 1px solid transparent"
>
Expand Down Expand Up @@ -107,12 +104,12 @@
</v-col>
</v-row>

<v-row>
<v-row v-if="productPriceUploadedList.length">
<v-col>
<v-btn
type="submit"
:loading="createPriceLoading"
:disabled="!proofFormFilled || !productPriceUploadedList.length"
:disabled="productPriceFormFilled"
@click="done"
>
{{ $t('AddPriceMultiple.Done') }}
Expand Down

0 comments on commit 7d0a8d2

Please sign in to comment.