Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

contentSection.vue 37KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  1. <template>
  2. <section id="contact2">
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-lg-12">
  6. <div class="section-header">
  7. <h2>Week Information</h2>
  8. </div>
  9. <div align="left" class="custom-control custom-switch mb-2">
  10. <div class="row">
  11. <div align="center" class="col">
  12. <label class="mr-5">Were you referred by an agent?</label>
  13. <input
  14. type="checkbox"
  15. class="custom-control-input"
  16. id="customSwitch1"
  17. :checked="refAgent"
  18. @change="changeRef"
  19. />
  20. <label class="custom-control-label" for="customSwitch1">
  21. {{ refAgent ? "Yes" : "No" }}
  22. </label>
  23. <div class="refbyAgent" :class="{ 'refbyAgent--clicked': refAgent }">
  24. <div class="col-md-6" v-if="refAgent">
  25. <label for="Name of Agency">Agency</label>
  26. <select
  27. class="form-control uniSelect"
  28. id="Agency"
  29. name="agency"
  30. v-model="sellItem.agencyId"
  31. >
  32. <option v-for="(item, i) in agencies" :key="i" :value="item.id">{{
  33. item.agencyName
  34. }}</option>
  35. </select>
  36. </div>
  37. <div class="col-md-6" v-if="refAgent">
  38. <label for="Name of Agent">Agent</label>
  39. <select
  40. class="form-control uniSelect"
  41. id="agent"
  42. name="agent"
  43. v-model="sellItem.agentId"
  44. :disabled="!sellItem.agencyId"
  45. >
  46. <option
  47. v-for="(item, i) in displayNotDeletedAgents"
  48. :key="i"
  49. :value="item.id"
  50. >
  51. <div>{{ item.name + " " + item.surname }}</div>
  52. </option>
  53. </select>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="form">
  60. <div id="sendmessage">Your details has been sent. Thank you!</div>
  61. <div id="errormessage"></div>
  62. <div class="form-row">
  63. <div class="form-group col-md-6 mt-2">
  64. <div class="input-group">
  65. <label v-if="!sellItem.region" class="uniSelectLabel" for="weekInfoRegionSelect"
  66. >REGION</label
  67. >
  68. <float-label label="REGION" style="width:100%">
  69. <select
  70. id="weekInfoRegionSelect"
  71. class="form-control uniSelect"
  72. v-model="sellItem.region"
  73. @change="regionChange()"
  74. style="font-size: 15px"
  75. >
  76. <option v-for="(region, r) in regions" :key="r" :value="region">
  77. {{ region.regionName }}
  78. </option>
  79. </select>
  80. </float-label>
  81. </div>
  82. <!-- <input
  83. type="text"
  84. name="region"
  85. class="form-control"
  86. id="region"
  87. placeholder="Region"
  88. data-rule="minlen:4"
  89. data-msg="Please enter the region"
  90. />-->
  91. <div class="validation"></div>
  92. </div>
  93. <div class="form-group col-md-6 mt-2">
  94. <div class="input-group">
  95. <label v-if="!sellItem.resort" class="uniSelectLabel" for="weekInfoResortSelect"
  96. >RESORT NAME</label
  97. >
  98. <float-label label="RESORT NAME" style="width:100%">
  99. <select
  100. id="weekInfoResortSelect"
  101. class="form-control uniSelect"
  102. v-model="sellItem.resort"
  103. @change="resortChange()"
  104. >
  105. <option value="Other">Other</option>
  106. <option v-for="(resort, r) in filteredResort" :key="r" :value="resort">
  107. {{ resort.resortName }}
  108. </option>
  109. </select>
  110. </float-label>
  111. </div>
  112. <!-- <input
  113. type="text"
  114. class="form-control"
  115. name="resort"
  116. id="resort"
  117. placeholder="Resort Name"
  118. data-rule="minlen:4"
  119. data-msg="Please enter resort name"
  120. />-->
  121. <div class="validation"></div>
  122. </div>
  123. <div class="form-group col-md-6">
  124. <input
  125. class="form-control"
  126. v-if="sellItem.otherResort"
  127. placeholder="NAME OF RESORT (* IF OTHER)"
  128. type="text"
  129. name="other"
  130. v-model="sellItem.otherResortName"
  131. />
  132. </div>
  133. <div class="form-group col-md-6 mt-2">
  134. <div v-if="sellItem.otherResort">
  135. <label v-if="!sellItem.region" class="uniSelectLabel" for="region">REGION</label>
  136. </div>
  137. <select
  138. class="form-control uniSelect"
  139. v-if="sellItem.otherResort"
  140. name="region"
  141. id="region"
  142. v-model="sellItem.region"
  143. >
  144. <option v-for="(region, r) in regions" :key="r">{{ region.regionName }}</option>
  145. </select>
  146. </div>
  147. <div class="form-group col-md-6 mt-2">
  148. <float-label>
  149. <input
  150. type="number"
  151. class="form-control"
  152. name="unitNumber"
  153. id="unitNumber"
  154. placeholder="UNIT NUMBER"
  155. v-model="sellItem.unitNumber"
  156. data-msg="Please enter unit number"
  157. />
  158. </float-label>
  159. <div class="validation"></div>
  160. </div>
  161. <div class="form-group col-md-6 mt-2">
  162. <float-label>
  163. <input
  164. type="text"
  165. class="form-control"
  166. name="week"
  167. id="week"
  168. placeholder="WEEK MODULE"
  169. v-model="sellItem.module"
  170. data-msg="Please enter week number"
  171. />
  172. </float-label>
  173. <div class="validation"></div>
  174. </div>
  175. <div class="form-group col-md-6 mt-2">
  176. <label v-if="!sellItem.season" class="uniSelectLabel" for="region">SEASON</label>
  177. <float-label label="SEASON">
  178. <select
  179. class="form-control uniSelect"
  180. name="region"
  181. id="region"
  182. v-model="sellItem.season"
  183. >
  184. <option v-for="(season, r) in seasons" :key="r">{{ season.name }}</option>
  185. </select>
  186. </float-label>
  187. <div class="validation"></div>
  188. </div>
  189. <div class="form-group col-md-6 mt-2">
  190. <label v-if="!sellItem.bedrooms" class="uniSelectLabel" for="region"
  191. >BEDROOM/S</label
  192. >
  193. <float-label label="BEDROOM/S">
  194. <select
  195. class="form-control uniSelect"
  196. name="region"
  197. id="region"
  198. v-model="sellItem.bedrooms"
  199. >
  200. <option v-for="(item, i) in resortBedrooms" :key="i">{{ item }}</option>
  201. </select>
  202. </float-label>
  203. <div class="validation"></div>
  204. </div>
  205. <div class="form-group col-md-6 mt-2">
  206. <label v-if="!sellItem.maxSleep" class="uniSelectLabel" for="region"
  207. >SLEEP MAX</label
  208. >
  209. <float-label label="SLEEP MAX">
  210. <select
  211. class="form-control uniSelect"
  212. name="region"
  213. id="region"
  214. v-model="sellItem.maxSleep"
  215. >
  216. <option v-for="(item, i) in maxSleep" :key="i">{{ item }}</option>
  217. </select>
  218. </float-label>
  219. <div class="validation"></div>
  220. </div>
  221. <div class="form-group col-md-6 mt-2">
  222. <float-label>
  223. <input
  224. type="number"
  225. class="form-control"
  226. name="levy"
  227. id="levy"
  228. placeholder="Levy Amount"
  229. v-model="sellItem.levyAmount"
  230. data-msg="Please enter levy amount"
  231. />
  232. </float-label>
  233. <div class="validation"></div>
  234. </div>
  235. <div class="form-group col-md-6 mt-2">
  236. <label v-if="!sellItem.weekType" class="uniSelectLabel" for="region"
  237. >WEEK TYPE</label
  238. >
  239. <float-label label="WEEK TYPE">
  240. <select
  241. class="form-control uniSelect"
  242. name="region"
  243. id="region"
  244. v-model="sellItem.weekType"
  245. >
  246. <option :key="0">Flexi</option>
  247. <option :key="1">Fixed</option>
  248. <option :key="2">Module</option>
  249. <option :key="3">Syndicate</option>
  250. </select>
  251. </float-label>
  252. </div>
  253. </div>
  254. </div>
  255. <div align="left" class="custom-control custom-switch mb-2">
  256. <div class="row">
  257. <div align="center" class="col">
  258. <label class="mr-5">Has your week been spacebanked for the current year?</label>
  259. <input
  260. type="checkbox"
  261. class="custom-control-input"
  262. id="customSwitch2"
  263. :checked="sellItem.currentYearBanked"
  264. @change="changeCurrentBanked"
  265. />
  266. <label class="custom-control-label" for="customSwitch2">
  267. {{ sellItem.currentYearBanked ? "Yes" : "No" }}
  268. </label>
  269. <div
  270. class="spacebanked1"
  271. :class="{ 'spacebanked1--clicked': sellItem.currentYearBanked }"
  272. >
  273. <div class="col-md-6">
  274. <label for="If yes, please confirm with whom" v-if="sellItem.currentYearBanked"
  275. >Please confirm with whom</label
  276. >
  277. <select
  278. class="form-control uniSelect"
  279. name="spacebankOwner"
  280. v-if="sellItem.currentYearBanked"
  281. v-model="sellItem.bankedWith"
  282. >
  283. <option v-for="(item, i) in bankedEntities" :key="i">{{ item }}</option>
  284. </select>
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. <div class="section-header">
  291. <h2>Detailed Individual Information</h2>
  292. </div>
  293. <div class="form">
  294. <div class="row mb-2">
  295. <div class="form-group col-md-6">
  296. <float-label>
  297. <input
  298. type="text"
  299. name="name"
  300. class="form-control"
  301. id="name"
  302. placeholder="Name"
  303. data-rule="minlen:4"
  304. data-msg="Please enter your name"
  305. v-model="indiv.name"
  306. />
  307. </float-label>
  308. <div class="validation"></div>
  309. </div>
  310. <div class="form-group col-md-6">
  311. <float-label>
  312. <input
  313. type="text"
  314. class="form-control"
  315. name="surname"
  316. id="surname"
  317. placeholder="Surname"
  318. data-msg="Please enter your surname"
  319. v-model="indiv.surname"
  320. />
  321. </float-label>
  322. <div class="validation"></div>
  323. </div>
  324. </div>
  325. <div class="row mb-2">
  326. <div class="form-group col-md-6">
  327. <float-label>
  328. <input
  329. type="text"
  330. name="idnum"
  331. class="form-control"
  332. id="idnum"
  333. placeholder="ID Number"
  334. data-rule="minlen:4"
  335. data-msg="Please enter your ID number"
  336. v-model="indiv.idNumber"
  337. />
  338. </float-label>
  339. <div class="validation"></div>
  340. </div>
  341. <div class="form-group col-md-6">
  342. <float-label>
  343. <input
  344. type="text"
  345. class="form-control"
  346. name="company"
  347. id="company"
  348. placeholder="Company Reg Number"
  349. data-rule="minlen:4"
  350. data-msg="Please enter your company reg number"
  351. v-model="indiv.companyRegNumber"
  352. />
  353. </float-label>
  354. <div class="validation"></div>
  355. </div>
  356. </div>
  357. <div class="row mb-2">
  358. <div class="form-group col-md-6">
  359. <div class="input-group">
  360. <span v-if="!indiv.howMarried">
  361. <label v-if="indiv.howMarried === 'N/A'" for="howMarried" class="uniSelectLabel"
  362. >Marital Status</label
  363. >
  364. </span>
  365. <float-label label="Marital Status" style="width:100%">
  366. <select
  367. class="form-control uniSelect"
  368. id="howMarried"
  369. v-model="indiv.howMarried"
  370. >
  371. <option value="N/A">N/A</option>
  372. <option value="In Community Of Property">In Community Of Property</option>
  373. <option value="Out of Community Of Property"
  374. >Out of Community Of Property</option
  375. >
  376. <option value="Other">Other</option>
  377. <option value="Traditional Wedding">Traditional Wedding</option>
  378. <option value="Single">Single</option>
  379. <option value="Divorced">Divorced</option>
  380. <option value="Widow">Widow</option>
  381. <option value="Committed Relationship">Committed Relationship</option>
  382. <option value="Partner">Partner</option>
  383. </select>
  384. </float-label>
  385. </div>
  386. <div class="validation"></div>
  387. </div>
  388. <div class="form-group col-md-6">
  389. <float-label>
  390. <input
  391. type="text"
  392. class="form-control"
  393. name="email"
  394. id="email"
  395. placeholder="Email Address"
  396. data-msg="Please enter your email address"
  397. v-model="indiv.emailAddress"
  398. />
  399. </float-label>
  400. <div class="validation"></div>
  401. </div>
  402. </div>
  403. <div class="row">
  404. <div class="form-group col-md-6">
  405. <float-label>
  406. <input
  407. type="text"
  408. name="cell"
  409. class="form-control"
  410. id="cell"
  411. placeholder="Cell Number"
  412. data-rule="minlen:4"
  413. data-msg="Please enter your cell number"
  414. v-model="indiv.cellNumner"
  415. />
  416. </float-label>
  417. <div class="validation"></div>
  418. </div>
  419. <div class="form-group col-md-6">
  420. <float-label>
  421. <input
  422. type="text"
  423. class="form-control"
  424. name="landline"
  425. id="landline"
  426. placeholder="Landline Number"
  427. data-msg="Please enter your landline number"
  428. v-model="indiv.landlineNumber"
  429. />
  430. </float-label>
  431. <div class="validation"></div>
  432. </div>
  433. </div>
  434. </div>
  435. <div v-if="indiv.howMarried === 'In Community Of Property'" class="section-header">
  436. <h2>Spouse Details</h2>
  437. </div>
  438. <div v-if="indiv.howMarried === 'In Community Of Property'" class="form">
  439. <div class="form-row mb-2">
  440. <div class="form-group col-md-6 mt-2">
  441. <float-label>
  442. <input
  443. type="text"
  444. class="form-control"
  445. placeholder="SPOUSE NAME"
  446. data-msg="Please enter your spouse's name"
  447. v-model="indiv.spouseName"
  448. />
  449. </float-label>
  450. <div class="validation"></div>
  451. </div>
  452. <div class="form-group col-md-6 mt-2">
  453. <float-label>
  454. <input
  455. type="text"
  456. class="form-control"
  457. placeholder="SPOUSE SURNAME"
  458. data-msg="Please enter your spouse's surname"
  459. v-model="indiv.spouseSurname"
  460. />
  461. </float-label>
  462. <div class="validation"></div>
  463. </div>
  464. <div class="form-group col-md-6 mt-2">
  465. <float-label>
  466. <input
  467. type="text"
  468. class="form-control"
  469. placeholder="SPOUSE EMAIL"
  470. data-rule="minlen:4"
  471. data-msg="Please enter your spouse's email"
  472. v-model="indiv.spouseEmail"
  473. />
  474. </float-label>
  475. <div class="validation"></div>
  476. </div>
  477. <div class="form-group col-md-6 mt-2">
  478. <float-label>
  479. <input
  480. type="text"
  481. class="form-control"
  482. placeholder="SPOUSE TELEPHONE"
  483. data-rule="minlen:4"
  484. data-msg="Please enter your spouse's telephone number"
  485. v-model="indiv.spouseTelephone"
  486. />
  487. </float-label>
  488. <div class="validation"></div>
  489. </div>
  490. <div class="form-group col-md-6 mt-2">
  491. <float-label>
  492. <input
  493. type="text"
  494. class="form-control"
  495. placeholder="SPOUSE CELL NUMBER"
  496. data-rule="minlen:4"
  497. data-msg="Please enter your spouse's cellphone number"
  498. v-model="indiv.spouseCellnumber"
  499. />
  500. </float-label>
  501. <div class="validation"></div>
  502. </div>
  503. </div>
  504. </div>
  505. <div class="section-header">
  506. <h2>Address</h2>
  507. </div>
  508. <div class="form">
  509. <div class="row">
  510. <div class="form-group col-md-12">
  511. <addressAutoComplete @GoogleAddress="UpdateAddress" />
  512. </div>
  513. </div>
  514. <div class="form-row">
  515. <div class="form-group col-md-6">
  516. <input
  517. type="text"
  518. name="street-nr"
  519. class="form-control"
  520. id="street-nr"
  521. placeholder="Street Number"
  522. data-rule="minlen:4"
  523. data-msg="Please enter your street number"
  524. v-model="indiv.address.streetNumber"
  525. disabled
  526. />
  527. <div class="validation"></div>
  528. </div>
  529. <div class="form-group col-md-6">
  530. <input
  531. type="text"
  532. class="form-control"
  533. name="street"
  534. id="street"
  535. placeholder="Street Name"
  536. data-msg="Please enter your street name"
  537. disabled
  538. v-model="indiv.address.street"
  539. />
  540. <div class="validation"></div>
  541. </div>
  542. <div class="form-group col-md-6">
  543. <input
  544. type="text"
  545. name="province"
  546. class="form-control"
  547. id="province"
  548. placeholder="Province"
  549. data-rule="minlen:4"
  550. data-msg="Please enter your province"
  551. disabled
  552. v-model="indiv.address.province"
  553. />
  554. <div class="validation"></div>
  555. </div>
  556. <div class="form-group col-md-6">
  557. <input
  558. type="text"
  559. class="form-control"
  560. name="city"
  561. id="city"
  562. placeholder="City"
  563. data-rule="minlen:4"
  564. data-msg="Please enter your city"
  565. v-model="indiv.address.city"
  566. disabled
  567. />
  568. <div class="validation"></div>
  569. </div>
  570. <div class="form-group col-md-6">
  571. <input
  572. type="text"
  573. name="suburb"
  574. class="form-control"
  575. id="suburb"
  576. placeholder="Suburb"
  577. data-rule="minlen:4"
  578. data-msg="Please enter your suburb"
  579. v-model="indiv.address.suburb"
  580. disabled
  581. />
  582. <div class="validation"></div>
  583. </div>
  584. <div class="form-group col-md-6">
  585. <input
  586. type="text"
  587. class="form-control"
  588. name="postal"
  589. id="postal"
  590. placeholder="Postal Code"
  591. data-msg="Please enter your postal code"
  592. v-model="indiv.address.postalCode"
  593. disabled
  594. />
  595. <div class="validation"></div>
  596. </div>
  597. </div>
  598. </div>
  599. <div class="section-header">
  600. <h2>Share Transfer Information</h2>
  601. </div>
  602. <div class="form">
  603. <div id="sendmessage">Your details has been sent. Thank you!</div>
  604. <div id="errormessage"></div>
  605. <div class="form-row">
  606. <div
  607. class="form-group col-md-12"
  608. style="border:solid;border-width:2px; border-color:rgb(27, 117, 187);border-radius: 3px"
  609. >
  610. <p style="text-align: left; margin:auto; padding:10px">
  611. 1. With respect to my timeshare module/week, I confirm that:
  612. </p>
  613. <div class="validation"></div>
  614. </div>
  615. </div>
  616. <div class="form-row">
  617. <div class="col-md-8">
  618. <p>1.1. All levy amounts for the current cycle have been paid in full</p>
  619. </div>
  620. <div class="form-group col-md-2">
  621. <div class="custom-control custom-switch">
  622. <input
  623. type="checkbox"
  624. class="custom-control-input"
  625. id="customSwitch3"
  626. :checked="sellItem.leviesPaidInFull"
  627. @change="changeLeviesPaidInFull"
  628. />
  629. <label class="custom-control-label" for="customSwitch3">
  630. {{ sellItem.leviesPaidInFull ? "Yes" : "No" }}
  631. </label>
  632. </div>
  633. <div class="validation"></div>
  634. </div>
  635. </div>
  636. <div class="form-row">
  637. <div class="col-md-8">
  638. <p>1.2. My week is placed on rental or exchange this year</p>
  639. </div>
  640. <div class="form-group col-md-2">
  641. <div class="custom-control custom-switch">
  642. <input
  643. type="checkbox"
  644. class="custom-control-input"
  645. id="customSwitch4"
  646. :checked="sellItem.weekPlacedForRental"
  647. @change="changeWeekPlacedForRental"
  648. />
  649. <label class="custom-control-label" for="customSwitch4">
  650. {{ sellItem.weekPlacedForRental ? "Yes" : "No" }}
  651. </label>
  652. </div>
  653. <div class="validation"></div>
  654. </div>
  655. </div>
  656. <div class="form-row">
  657. <div class="col-md-8">
  658. <p>1.3. I / We bought the timeshare module/week on the following date:</p>
  659. </div>
  660. <div class="form-group col-md-2">
  661. <input
  662. type="date"
  663. class="form-control"
  664. name="date"
  665. v-model="sellItem.originalPurchaseDate"
  666. />
  667. <div class="validation"></div>
  668. </div>
  669. </div>
  670. <div class="form-row">
  671. <div class="col-md-8">
  672. <p>1.4. The purchase price for which I / we bought timeshare module / week was:</p>
  673. </div>
  674. <div class="form-group col-md-2">
  675. <input
  676. class="form-control"
  677. placeholder="R"
  678. type="number"
  679. step="any"
  680. name="purchasePrice"
  681. v-model="sellItem.originalPurchasePrice"
  682. />
  683. <div class="validation"></div>
  684. </div>
  685. </div>
  686. <div class="form-row">
  687. <div class="col-md-8">
  688. <p>
  689. 1.5. I / We bought the timeshare module / week for the following dates for the
  690. current year:
  691. </p>
  692. </div>
  693. <div class="form-group col-md-2">
  694. Arrival Date :
  695. <input
  696. type="date"
  697. class="form-control"
  698. name="occupationDate1"
  699. v-model="sellItem.arrivalDate"
  700. />
  701. <div class="validation"></div>
  702. </div>
  703. <div class="form-group col-md-2">
  704. Departure Date :
  705. <input
  706. type="date"
  707. class="form-control"
  708. name="occupationDate2"
  709. v-model="sellItem.departureDate"
  710. />
  711. <div class="validation"></div>
  712. </div>
  713. </div>
  714. <div class="form-row">
  715. <div class="col-md-8">
  716. <p>
  717. 1.6. The selling price for the timeshare module / week for which I / we want to
  718. sell is: (Incl. Vat)
  719. </p>
  720. </div>
  721. <div class="form-group col-md-2">
  722. <input
  723. class="form-control"
  724. type="number"
  725. step="any"
  726. name="sellingPrice"
  727. v-model="sellItem.sellPrice"
  728. placeholder="R"
  729. />
  730. <div class="validation"></div>
  731. </div>
  732. </div>
  733. <div class="form-row">
  734. <div class="col-md-8">
  735. <p>1.7. Estate agent's commission agreed to (state Rand value)</p>
  736. </div>
  737. <div class="form-group col-md-2">
  738. <input
  739. class="form-control"
  740. type="number"
  741. step="any"
  742. name="commission"
  743. v-model="sellItem.agentCommission"
  744. placeholder="R"
  745. />
  746. <div class="validation"></div>
  747. </div>
  748. </div>
  749. <div class="form-row">
  750. <div class="col-md-8">
  751. <p>
  752. 1.8. I hereby Mandate Uni-Vate properties to sell the timeshare listed above on my
  753. behalf
  754. </p>
  755. </div>
  756. <div class="form-group col-md-4">
  757. <input type="checkbox" @change="SetMandateDate" v-model="sellItem.mandate" />
  758. </div>
  759. </div>
  760. <div class="form-row" v-if="!CanSave">
  761. <div class="col-md-12">
  762. <p class="alert myError">Please ensure that you add spouse details.</p>
  763. </div>
  764. </div>
  765. <div class="form-row" v-if="profileEmailError">
  766. <div class="col-md-12">
  767. <p class="alert myError">
  768. Please ensure that your email is correct before adding a timeshare week.
  769. </p>
  770. </div>
  771. </div>
  772. <div class="text-center col-12" v-if="CanSave">
  773. <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">
  774. SUBMIT
  775. </button>
  776. <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
  777. </div>
  778. <!-- <div class="text-center col-12">
  779. <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
  780. </div>-->
  781. <br />
  782. <br />
  783. </div>
  784. </div>
  785. <br />
  786. <br />
  787. </div>
  788. <div v-if="wait" id="preloader"></div>
  789. </div>
  790. </section>
  791. </template>
  792. <script>
  793. /* eslint-disable */
  794. import { mapState, mapActions, mapGetters } from "vuex";
  795. import addressAutoComplete from "../../shared/addressAutoComplete";
  796. import Alert from "../../shared/alert.vue";
  797. import Log from "../../../assets/Log";
  798. import _ from "lodash";
  799. export default {
  800. name: "TimeshareToSell",
  801. props: {
  802. weekId: {
  803. default: 0
  804. }
  805. },
  806. data() {
  807. return {
  808. wait: false,
  809. userLoggedIn: Log.isLoggedIn(),
  810. profileEmailError: false
  811. };
  812. },
  813. components: {
  814. addressAutoComplete,
  815. Alert
  816. },
  817. mounted() {
  818. if (this.sellItem.id) {
  819. this.newSale();
  820. }
  821. this.initTimeshare(0);
  822. this.getIndividual(Log.getUser().id);
  823. this.getBanks();
  824. this.getStatusList();
  825. },
  826. created() {
  827. this.initTimeshare(this.weekId);
  828. },
  829. computed: {
  830. ...mapState("timeshare", [
  831. "resorts",
  832. "regions",
  833. "detailedRegion",
  834. "seasons",
  835. "result",
  836. "resortBedrooms",
  837. "maxSleep",
  838. "bankedEntities",
  839. "sellItem",
  840. "agencies",
  841. "agents",
  842. "getTemplate"
  843. ]),
  844. ...mapState("individual", ["indiv"]),
  845. ...mapState("authentication", ["isLoggedIn"]),
  846. ...mapState("status", ["statusList"]),
  847. ...mapGetters({
  848. user: "authentication/getUser",
  849. person: "authentication/getPerson"
  850. }),
  851. ...mapState("bank", ["banks"]),
  852. refAgent() {
  853. return this.sellItem && this.sellItem.referedByAgent;
  854. },
  855. ...mapGetters("fees", ["getListingFee"]),
  856. filteredResort() {
  857. let list = [];
  858. if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
  859. const item = this.detailedRegion.find(
  860. region => region.region.regionCode === this.sellItem.region.regionCode
  861. );
  862. if (item) {
  863. list = item.children;
  864. }
  865. } else {
  866. list = this.resorts;
  867. }
  868. return _.sortBy(list, x => x.resortName);
  869. },
  870. isLoggedIn() {
  871. return this.user && this.person;
  872. },
  873. displayNotDeletedAgents() {
  874. var notDeletedArr = [];
  875. this.agents.forEach(agent => {
  876. if (!agent.isDeleted) {
  877. if (agent.agencyId === this.sellItem.agencyId) {
  878. notDeletedArr.push(agent);
  879. }
  880. }
  881. });
  882. return notDeletedArr;
  883. },
  884. CanSave() {
  885. if (this.indiv.howMarried === "In Community Of Property") {
  886. if (this.indiv.spouseName || this.indiv.spouseSurname || this.spouseEmail) {
  887. return true;
  888. }
  889. return false;
  890. }
  891. return true;
  892. }
  893. },
  894. methods: {
  895. ...mapActions("individual", ["getIndividual"]),
  896. ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
  897. ...mapActions("payment", ["addPayment"]),
  898. ...mapActions("bank", ["getBanks"]),
  899. ...mapActions("status", ["getStatusList"]),
  900. newSale() {
  901. this.weekId = 0;
  902. this.getBlankWeek();
  903. },
  904. submitSale() {
  905. if (this.userLoggedIn) {
  906. this.sellItem.ownerObject = this.indiv;
  907. this.sellItem.weekStatus = "For Sale";
  908. //Sets the status of the week to waiting for EFT Payment
  909. this.statusList.forEach(status => {
  910. if (status.code === "APEFT") {
  911. this.sellItem.statusId = status.id;
  912. }
  913. });
  914. this.saveWeek(this.sellItem)
  915. .then(fulfilled => {
  916. console.log(fulfilled);
  917. // this.$router.push({ name: "PaymentOption", params: { week: fulfilled } });
  918. this.$router.push({ name: "EFTPage", params: { week: fulfilled } });
  919. //this.paygateRedirect();
  920. })
  921. .catch(ex => {
  922. this.profileEmailError = true;
  923. });
  924. } else {
  925. this.$router.push("/user/login");
  926. }
  927. },
  928. paygateRedirect() {
  929. var amount = this.getListingFee.amount;
  930. var paymentObj = {
  931. timeshareWeekId: this.sellItem.id, // this.sellItem.Id,
  932. propertyId: 0,
  933. creatydById: Log.getUser().id, //Log.getUser().id,
  934. amount: amount,
  935. paymentStatus: "",
  936. paymentToken: ""
  937. };
  938. this.addPayment(paymentObj).then(res => {
  939. this.$router.push({
  940. name: "PaymentGateway",
  941. params: {
  942. paymentReqId: res.PAY_REQUEST_ID,
  943. checksum: res.CHECKSUM
  944. }
  945. });
  946. });
  947. },
  948. previewFiles(event) {
  949. console.log(event.target.files);
  950. },
  951. changeRef() {
  952. this.sellItem.agent = undefined;
  953. this.sellItem.agency = undefined;
  954. this.sellItem.referedByAgent = !this.sellItem.referedByAgent;
  955. },
  956. changeLeviesPaidInFull() {
  957. this.sellItem.leviesPaidInFull = !this.sellItem.leviesPaidInFull;
  958. },
  959. changeWeekPlacedForRental() {
  960. this.sellItem.weekPlacedForRental = !this.sellItem.weekPlacedForRental;
  961. },
  962. changeCurrentBanked() {
  963. this.sellItem.bankedWith = undefined;
  964. this.sellItem.currentYearBanked = !this.sellItem.currentYearBanked;
  965. },
  966. resortChange() {
  967. this.onResortChange({
  968. resortName: this.sellItem.resort.resortName,
  969. resortCode: this.sellItem.resort.resortCode
  970. });
  971. if (this.sellItem && this.sellItem.resort === "Other") {
  972. this.sellItem.otherResortName = undefined;
  973. this.sellItem.otherResort = true;
  974. } else {
  975. this.sellItem.otherResortName = undefined;
  976. this.sellItem.otherResort = false;
  977. }
  978. },
  979. regionChange() {
  980. this.sellItem.regionId = this.sellItem.region ? this.sellItem.region.id : 1;
  981. },
  982. UpdateAddress(address) {
  983. this.indiv.address.streetNumber = address.streetNumber;
  984. this.indiv.address.street = address.streetName;
  985. this.indiv.address.province = address.province;
  986. this.indiv.address.city = address.city;
  987. this.indiv.address.suburb = address.suburb;
  988. this.indiv.address.postalCode = address.postalCode;
  989. },
  990. SetMandateDate() {
  991. if (this.sellItem.mandate) {
  992. this.sellItem.mandateDate = new Date();
  993. } else {
  994. this.sellItem.mandateDate = undefined;
  995. }
  996. }
  997. }
  998. };
  999. </script>
  1000. <style lang="scss" scoped>
  1001. .refbyAgent {
  1002. will-change: transform;
  1003. transition: height 500ms;
  1004. height: 0px;
  1005. }
  1006. .refbyAgent--clicked {
  1007. height: 150px;
  1008. }
  1009. .spacebanked1 {
  1010. will-change: transform;
  1011. transition: height 500ms;
  1012. height: 0px;
  1013. }
  1014. .spacebanked1--clicked {
  1015. height: 150px;
  1016. }
  1017. .custom-file-label {
  1018. border-width: 2px;
  1019. border-color: rgb(27, 117, 187);
  1020. margin-bottom: 20px;
  1021. }
  1022. .custom-file-label::after {
  1023. border-left: none;
  1024. border-bottom: solid;
  1025. border-width: 2px;
  1026. border-color: rgb(27, 117, 187);
  1027. font-family: "Muli";
  1028. }
  1029. </style>