Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions pages/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ exports[`Pages / SearchPage when all data is correct should render the page 1`]
</div>

<div
class="v-input theme--light v-text-field v-text-field--single-line v-text-field--solo v-text-field--enclosed v-select v-autocomplete"
class="v-input theme--light v-text-field v-text-field--single-line v-text-field--solo v-text-field--enclosed v-select v-select--is-multi v-autocomplete"
>
<div
class="v-input__control"
Expand All @@ -162,11 +162,15 @@ exports[`Pages / SearchPage when all data is correct should render the page 1`]
>
Cid
</label>
<input
autocomplete="off"
id="input-14"
type="text"
/>
<div
class="v-select__selections"
>
<input
autocomplete="off"
id="input-14"
type="text"
/>
</div>
<div
class="v-input__append-inner"
>
Expand Down
5 changes: 3 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
:items="cids"
label="Cid"
solo
multiple
/>
<div class="search-page__time-container">
<v-dialog
Expand Down Expand Up @@ -113,7 +114,7 @@ export default {
...mapState('cid', ['cids']),
...mapState('bus', ['busRoutes']),
formIsEmpty () {
return !this.searchBody.cid || !this.searchBody.data || !this.searchBody.destinationCityId || !this.searchBody.hora || !this.searchBody.originCityId
return !this.searchBody.data || !this.searchBody.destinationCityId || !this.searchBody.hora || !this.searchBody.originCityId
}
},
created () {
Expand All @@ -137,7 +138,7 @@ export default {
this.hideAlert()
if (this.formIsEmpty) {
const propsAlert = {
alertMessage: 'Todos os campos devem ser preenchidos',
alertMessage: 'Informe todos os campos necessários (origem, destino, data e horário)',
alertType: 'error'
}
this.showAlert(propsAlert)
Expand Down