Skip to content

Commit

Permalink
Adressing prop requirement issues in components
Browse files Browse the repository at this point in the history
  • Loading branch information
jolzee committed Feb 20, 2020
1 parent 60c1577 commit f89d543
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/components/Audio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
},
type: {
type: String,
required: true
required: false
}
},
data() {
Expand Down
6 changes: 5 additions & 1 deletion src/components/ChatTeneoResponse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
<YouTube :video-id="youTubeVideoId(extension)" class="mt-2"></YouTube>
</v-col>
</v-row>
<v-row v-if="hasInlineType(extension, 'audio')" no-gutters class="px-3 pt-2">
<v-row
v-if="hasInlineType(extension, 'audio') && audioInfo(extension).audioUrl"
no-gutters
class="px-3 pt-2"
>
<v-col cols="12">
<Audio :url="audioInfo(extension).audioUrl" class="mt-2"></Audio>
</v-col>
Expand Down
24 changes: 10 additions & 14 deletions src/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
type="info"
elevation="2"
@click="overlay = false"
>{{ overlayMessage }}</v-alert
>
>{{ overlayMessage }}</v-alert>
</v-overlay>
</v-fade-transition>
<v-system-bar
Expand All @@ -75,17 +74,15 @@
tag="button"
:aria-label="fullscreen ? 'Restore dialog size' : 'Maximize dialog'"
@click="toggleFullscreen"
>{{ fullscreen ? "mdi-window-restore" : "mdi-window-maximize" }}</v-icon
>
<v-icon tag="button" aria-label="Close dialog" tabindex="0" @click="hideModal"
>mdi-close</v-icon
>
>{{ fullscreen ? "mdi-window-restore" : "mdi-window-maximize" }}</v-icon>
<v-icon tag="button" aria-label="Close dialog" tabindex="0" @click="hideModal">mdi-close</v-icon>
</v-system-bar>

<v-app-bar :dense="title.length < 43" :color="`primary ${textColor('primary')}`">
<h2 class="subtitle-1" :aria-label="aria ? aria : title ? title : $t('more.info.title')">
{{ title ? title : $t("more.info.title") }}
</h2>
<h2
class="subtitle-1"
:aria-label="aria ? aria : title ? title : $t('more.info.title')"
>{{ title ? title : $t("more.info.title") }}</h2>
<v-spacer></v-spacer>
</v-app-bar>
<v-card-text
Expand Down Expand Up @@ -128,7 +125,7 @@
class="mt-3"
>
<!-- Show the flight itinerary -->
<FlightItinerary :itinerary="itinerary"></FlightItinerary>
<FlightItinerary v-if="itinerary" :itinerary="itinerary"></FlightItinerary>

<!-- show the body text -->
<v-card-text
Expand Down Expand Up @@ -196,8 +193,7 @@
small
@click.native="hideModal"
@shortkey.native="hideModal"
>{{ $t("back.to.chat.button") }}</v-btn
>
>{{ $t("back.to.chat.button") }}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
Expand Down Expand Up @@ -705,7 +701,7 @@ export default {
this.customModalItems = [];
this.imageUrl = "";
this.images = [];
this.itinerary = "";
this.itinerary = null;
this.fullscreen = false;
this.overlay = false;
this.overlayMessage = "";
Expand Down
20 changes: 10 additions & 10 deletions src/components/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
itemsPerPageOptions: calcRowsPerPage
}"
>
<template
slot="
items"
slot-scope="props"
>
<template slot="
items" slot-scope="props">
<td
v-for="(header, key) in headers"
:key="key"
class="text-left"
v-html="props.item[header.value]"
></td>
</template>
<v-alert slot="no-results" :value="true" color="error" icon="mdi-alert-octagram"
>Your search for "{{ search }}" found no results.</v-alert
>
<v-alert
slot="no-results"
:value="true"
color="error"
icon="mdi-alert-octagram"
>Your search for "{{ search }}" found no results.</v-alert>
<template v-if="footer" slot="footer">
<td colspan="100%">
<strong>{{ footer }}</strong>
Expand All @@ -43,15 +43,15 @@ export default {
required: true
},
search: {
type: Boolean,
type: String,
required: false
},
footer: {
type: String,
required: true
},
rowsPerPage: {
type: String,
type: Array,
required: true
}
},
Expand Down

0 comments on commit f89d543

Please sign in to comment.