You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

427 lines
11 KiB

2 years ago
  1. <template>
  2. <v-row class="mb-6">
  3. <v-col cols="12">
  4. <div style="font-size: 1.5em">
  5. <samp style="color: #ee9546">{{ exhibition.rating }}</samp>
  6. <span class="mdi mdi-star" style="color: #ee9546"></span>
  7. <samp style="color: #9c9c9c"
  8. >({{ exhibition.reviewCount }} reviews)</samp
  9. >
  10. </div>
  11. <div
  12. style="
  13. background: rgba(248, 248, 248, 0.4);
  14. border-radius: 15px;
  15. padding: 15px;
  16. font-size: 1.2em;
  17. position: relative;
  18. "
  19. >
  20. <div
  21. style="
  22. position: absolute;
  23. border-radius: 15px;
  24. width: 100%;
  25. height: 100%;
  26. top: 0px;
  27. left: 0px;
  28. background: rgba(248, 248, 248, 0.69);
  29. "
  30. ></div>
  31. <div class="reviewLogin">
  32. <v-btn
  33. color="warning"
  34. class="
  35. recommend-tag
  36. no-text-transform
  37. text-space-1
  38. rounded-lg
  39. ml-2
  40. mt-2
  41. "
  42. >
  43. Log in / Sign up
  44. </v-btn>
  45. </div>
  46. <div>
  47. <div>Write a review</div>
  48. <p></p>
  49. <div>
  50. <v-rating dense half-increments readonly size="24"></v-rating>
  51. </div>
  52. <div>
  53. <v-radio-group>
  54. <v-radio label="Visitor" value="radio-1"> </v-radio>
  55. <v-radio label="Exhibitor" value="radio-1"> </v-radio>
  56. </v-radio-group>
  57. </div>
  58. <div>
  59. <v-btn
  60. outlined
  61. class="
  62. warning--text
  63. recommend-tag
  64. no-text-transform
  65. text-space-1
  66. rounded-lg
  67. ml-4
  68. mt-2
  69. "
  70. >
  71. Variety of Products
  72. </v-btn>
  73. <v-btn
  74. outlined
  75. class="
  76. warning--text
  77. recommend-tag
  78. no-text-transform
  79. text-space-1
  80. rounded-lg
  81. ml-4
  82. mt-2
  83. "
  84. >
  85. Great Network Opportunity
  86. </v-btn>
  87. <v-btn
  88. outlined
  89. class="
  90. warning--text
  91. recommend-tag
  92. no-text-transform
  93. text-space-1
  94. rounded-lg
  95. ml-4
  96. mt-2
  97. "
  98. >
  99. Good Quality of Participants
  100. </v-btn>
  101. </div>
  102. <p></p>
  103. <div style="background: #f8f8f8; border-radius: 15px">
  104. <div style="color: #9c9c9c; padding: 15px; height: 124px">
  105. Tell us what do you think ...
  106. </div>
  107. </div>
  108. <div class="addReviewsBtn">
  109. <div class="addReviewsLeftBtn">
  110. <v-btn
  111. style="border-style: solid; border-color: #7997ff"
  112. class="
  113. primary--text
  114. recommend-tag
  115. no-text-transform
  116. text-space-1
  117. rounded-lg
  118. ml-2
  119. mt-2
  120. "
  121. >
  122. <v-icon>mdi-plus</v-icon>
  123. Add Photo
  124. </v-btn>
  125. </div>
  126. <div class="addReviewsRightBtn">
  127. <v-btn
  128. class="
  129. warning--text
  130. recommend-tag
  131. no-text-transform
  132. text-space-1
  133. rounded-lg
  134. ml-2
  135. mt-2
  136. "
  137. >
  138. Clear
  139. </v-btn>
  140. <v-btn
  141. color="warning"
  142. class="
  143. recommend-tag
  144. no-text-transform
  145. text-space-1
  146. rounded-lg
  147. ml-2
  148. mt-2
  149. "
  150. >
  151. Post
  152. </v-btn>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="reviewsSelect">
  158. <div class="reviewsFilterSelect">
  159. <div>Filter</div>
  160. <div>
  161. <v-select
  162. v-model="filterName"
  163. style="width: 170px"
  164. :items="filter"
  165. dense
  166. outlined
  167. ></v-select>
  168. </div>
  169. </div>
  170. <div class="reviewsSortbySelect">
  171. <div>Sort by</div>
  172. <div>
  173. <v-select
  174. v-model="sortByName"
  175. style="width: 260px"
  176. :items="sortBy"
  177. dense
  178. outlined
  179. ></v-select>
  180. </div>
  181. </div>
  182. </div>
  183. <!--div v-if="Array.isArray(exhibition.reviews.users)" v-for="item in exhibition.reviews.users" :key="item.id">
  184. <div class="usersReviewsArea">
  185. <div class="usersPeoplePic">
  186. <div class="usersPeoplePhoto">
  187. <v-avatar size="100">
  188. <v-img :src="item.user.avatar"></v-img>
  189. </v-avatar>
  190. </div>
  191. <p></p>
  192. <div class="reviewsUsersName">
  193. <div></div>
  194. <div style="font-size: 1.5em">
  195. <b>{{ item.user.name }}</b>
  196. </div>
  197. <div></div>
  198. </div>
  199. <div style="color: #9c9c9c" class="usersHeadline">
  200. <div></div>
  201. <div style="font-size: 1.5em">{{ item.user.headline }}</div>
  202. <div></div>
  203. </div>
  204. </div>
  205. <div class="usersReviewsDetail">
  206. <div class="usersReviewsStarTitleArea">
  207. <div class="usersReviewsStar">
  208. <v-rating
  209. :value="item.rating"
  210. color="amber"
  211. dense
  212. :length="starLength"
  213. half-increments
  214. readonly
  215. size="15"
  216. ></v-rating>
  217. </div>
  218. <div class="usersReviewsTitle">
  219. &nbsp;&nbsp;<b>{{ getstarLength(item.title) }}</b>
  220. </div>
  221. </div>
  222. <div class="col-md-12 col-md-offset-3 usersReviewsBtn">
  223. <v-btn
  224. v-for="array in item.tags"
  225. :key="array.id"
  226. outlined
  227. class="
  228. warning--text
  229. recommend-tag
  230. no-text-transform
  231. text-space-1
  232. rounded-lg
  233. mt-2
  234. "
  235. >
  236. {{ array.name }}
  237. </v-btn>
  238. </div>
  239. <div>
  240. <v-col>{{ item.comment }}</v-col>
  241. </div>
  242. <div>
  243. <v-col>
  244. <v-img
  245. v-for="array in item.images"
  246. :key="array.images"
  247. :src="array"
  248. width="90px"
  249. height="90px"
  250. style="display: inline-block; margin-left: 10px"
  251. ></v-img>
  252. </v-col>
  253. </div>
  254. <div style="color: #9c9c9c">
  255. <v-col>
  256. {{ item.date }}
  257. </v-col>
  258. </div>
  259. </div>
  260. </div>
  261. </div-->
  262. </v-col>
  263. </v-row>
  264. </template>
  265. <script>
  266. export default {
  267. name: "ExhibitionReviews",
  268. props: {
  269. exhibition: {
  270. type: Object,
  271. default: () => ({
  272. rating: "",
  273. reviewCount: "",
  274. reviews: {},
  275. }),
  276. },
  277. },
  278. data() {
  279. return {
  280. filterName: "For Everyone",
  281. filter: ["For Everyone", "For Exhibitor", "For Visitor"],
  282. sortByName: "Date:Newest to Oldest",
  283. sortBy: [
  284. "With Photo",
  285. "Date:Newest to Oldest",
  286. "Rating(High to Low)",
  287. "Rating(Low to High)",
  288. ],
  289. starLength: 0,
  290. };
  291. },
  292. methods: {
  293. getstarLength: function (title) {
  294. switch (title) {
  295. case "Highly recommended":
  296. this.starLength = 5;
  297. break;
  298. case "Worth going":
  299. this.starLength = 4;
  300. break;
  301. case "Good":
  302. this.starLength = 3;
  303. break;
  304. default:
  305. this.starLength = 0;
  306. break;
  307. }
  308. return title;
  309. },
  310. dateFormat: function (date) {
  311. return date.replaceAll("-", "/");
  312. },
  313. },
  314. };
  315. </script>
  316. <style>
  317. .reviewLogin {
  318. position: absolute;
  319. top: 40%;
  320. left: 40%;
  321. }
  322. .addReviewsLeftBtn {
  323. grid-area: addReviewsLeftBtn;
  324. text-align: left;
  325. }
  326. .addReviewsRightBtn {
  327. grid-area: addReviewsRightBtn;
  328. text-align: right;
  329. }
  330. .addReviewsBtn {
  331. display: grid;
  332. grid-template-areas: "addReviewsLeftBtn addReviewsRightBtn";
  333. }
  334. .reviewsFilterSelect {
  335. grid-area: reviewsFilterSelect;
  336. }
  337. .reviewsSortbySelect {
  338. grid-area: reviewsSortbySelect;
  339. }
  340. .reviewsSelect {
  341. display: grid;
  342. grid-template-columns: 1fr auto;
  343. grid-template-areas: "reviewsFilterSelect reviewsSortbySelect";
  344. }
  345. .usersPeoplePic {
  346. grid-area: usersPeoplePic;
  347. text-align: center;
  348. }
  349. .usersReviewsDetail {
  350. grid-area: usersReviewsDetail;
  351. background: #f8f8f8;
  352. border-radius: 15px;
  353. padding: 15px;
  354. margin-left: 50px;
  355. }
  356. .usersReviewsArea {
  357. display: grid;
  358. grid-template-columns: 1fr 5fr;
  359. grid-template-areas: "usersPeoplePic usersReviewsDetail";
  360. }
  361. .usersReviewsStar {
  362. grid-area: usersReviewsStar;
  363. margin-left: 10px;
  364. }
  365. .usersReviewsTitle {
  366. grid-area: usersReviewsTitle;
  367. }
  368. .usersReviewsStarTitleArea {
  369. display: grid;
  370. grid-template-columns: auto 1fr;
  371. grid-template-areas: "usersReviewsStar usersReviewsTitle";
  372. }
  373. @media only screen and (min-width: 0px) and (max-width: 899px) {
  374. .usersPeoplePhoto {
  375. grid-area: usersPeoplePhoto;
  376. }
  377. .reviewsUsersName {
  378. grid-area: reviewsUsersName;
  379. vertical-align: middle;
  380. margin-left: 30px;
  381. display: grid;
  382. grid-template-rows: repeat(3);
  383. }
  384. .usersHeadline {
  385. grid-area: usersHeadline;
  386. vertical-align: middle;
  387. margin-left: 20px;
  388. display: grid;
  389. grid-template-rows: repeat(3);
  390. }
  391. .usersReviewsBtn {
  392. display: none;
  393. }
  394. .usersPeoplePic {
  395. grid-area: usersPeoplePic;
  396. text-align: left;
  397. padding: 50px;
  398. margin-left: 10px;
  399. display: grid;
  400. grid-template-columns: auto auto 1fr;
  401. grid-template-areas: "usersPeoplePhoto reviewsUsersName usersHeadline";
  402. }
  403. .usersReviewsDetail {
  404. grid-area: usersReviewsDetail;
  405. background: #f8f8f8;
  406. border-radius: 15px;
  407. padding: 5px;
  408. }
  409. .usersReviewsArea {
  410. display: grid;
  411. grid-template-areas:
  412. "usersPeoplePic usersPeoplePic"
  413. "usersReviewsDetail usersReviewsDetail";
  414. }
  415. .usersReviewsStar {
  416. grid-area: usersReviewsStar;
  417. font-size: 1.5em;
  418. }
  419. .usersReviewsTitle {
  420. grid-area: usersReviewsTitle;
  421. font-size: 1.5em;
  422. }
  423. }
  424. </style>