-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from Cowofi/47-space-reviews
47 space reviews
- Loading branch information
Showing
7 changed files
with
392 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<p>{{ $t("messages.information.howDidweDo") }}</p> | ||
<div class="text-center"> | ||
<q-rating | ||
v-model="rating" | ||
size="3.5em" | ||
color="yellow-8" | ||
icon="eva-star-outline" | ||
icon-selected="eva-star" | ||
/> | ||
</div> | ||
</div> | ||
<div class="col-12"> | ||
<p>{{ $t("messages.information.careShareMoreAboutIt") }}</p> | ||
<q-input | ||
v-model="comment" | ||
outlined | ||
:label="$t('common.comment')" | ||
type="textarea" | ||
:counter="true" | ||
:maxlength="100" | ||
/> | ||
</div> | ||
<div class="col-12 text-center"> | ||
<q-btn | ||
:disabled="rating === 0" | ||
:loading="loading" | ||
@click="submit" | ||
push | ||
color="primary" | ||
text-color="white" | ||
:label="$t('action.publishFeedback')" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { ref } from "vue"; | ||
export default { | ||
name: "ComponentReviewForm", | ||
props: { | ||
loading: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
setup(props, { emit }) { | ||
const rating = ref(0); | ||
const comment = ref(""); | ||
return { | ||
rating, | ||
comment, | ||
submit() { | ||
emit("on-created", { | ||
rating: rating.value, | ||
comment: comment.value, | ||
}); | ||
}, | ||
}; | ||
}, | ||
}; | ||
</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,57 @@ | ||
<template> | ||
<div class="row q-col-gutter-sm"> | ||
<div class="col-12"> | ||
<div class="row justify-center items-center"> | ||
<div class="col-4"> | ||
<q-avatar color="primary" text-color="white"> | ||
{{ review.users.raw_user_meta_data.full_name.substring(0, 1) }} | ||
</q-avatar> | ||
<span class="q-ml-sm"> | ||
{{ review.users.raw_user_meta_data.full_name }} | ||
</span> | ||
</div> | ||
<div class="col text-right text-grey-8"> | ||
{{ timeAgo(review.created_at) }} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-12"> | ||
<q-rating | ||
v-model="rating" | ||
size="1.5em" | ||
color="yellow-8" | ||
icon="eva-star-outline" | ||
icon-selected="eva-star" | ||
readonly | ||
/> | ||
</div> | ||
<div class="col-12"> | ||
<q-separator /> | ||
</div> | ||
<div class="col-12"> | ||
<p>{{ review.comment }}</p> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { ref } from "vue"; | ||
import { timeAgo } from "src/utils/time"; | ||
export default { | ||
name: "ComponentReviewCard", | ||
props: { | ||
review: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
setup(props) { | ||
const rating = ref(props.review.rating); | ||
return { | ||
rating, | ||
timeAgo, | ||
}; | ||
}, | ||
}; | ||
</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
Oops, something went wrong.