Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

contentSection.vue 36KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053
  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="number"
  165. class="form-control"
  166. name="week"
  167. id="week"
  168. placeholder="UNIT / WEEK NUMBER"
  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="text-center col-12" v-if="CanSave">
  766. <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">
  767. SUBMIT
  768. </button>
  769. <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
  770. </div>
  771. <!-- <div class="text-center col-12">
  772. <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
  773. </div>-->
  774. <br />
  775. <br />
  776. </div>
  777. </div>
  778. <br />
  779. <br />
  780. </div>
  781. <div v-if="wait" id="preloader"></div>
  782. </div>
  783. </section>
  784. </template>
  785. <script>
  786. /* eslint-disable */
  787. import { mapState, mapActions, mapGetters } from "vuex";
  788. import addressAutoComplete from "../../shared/addressAutoComplete";
  789. import Alert from "../../shared/alert.vue";
  790. import Log from "../../../assets/Log";
  791. import _ from "lodash";
  792. export default {
  793. name: "TimeshareToSell",
  794. props: {
  795. weekId: {
  796. default: 0
  797. }
  798. },
  799. data() {
  800. return {
  801. wait: false,
  802. userLoggedIn: Log.isLoggedIn()
  803. };
  804. },
  805. components: {
  806. addressAutoComplete,
  807. Alert
  808. },
  809. mounted() {
  810. if (this.sellItem.id) {
  811. this.newSale();
  812. }
  813. this.initTimeshare(0);
  814. this.getIndividual(Log.getUser().id);
  815. this.getBanks();
  816. },
  817. created() {
  818. this.initTimeshare(this.weekId);
  819. },
  820. computed: {
  821. ...mapState("timeshare", [
  822. "resorts",
  823. "regions",
  824. "detailedRegion",
  825. "seasons",
  826. "result",
  827. "resortBedrooms",
  828. "maxSleep",
  829. "bankedEntities",
  830. "sellItem",
  831. "agencies",
  832. "agents",
  833. "getTemplate"
  834. ]),
  835. ...mapState("individual", ["indiv"]),
  836. ...mapState("authentication", ["isLoggedIn"]),
  837. ...mapGetters({
  838. user: "authentication/getUser",
  839. person: "authentication/getPerson"
  840. }),
  841. ...mapState("bank", ["banks"]),
  842. refAgent() {
  843. return this.sellItem && this.sellItem.referedByAgent;
  844. },
  845. ...mapGetters("fees", ["getListingFee"]),
  846. filteredResort() {
  847. let list = [];
  848. if (this.sellItem && this.sellItem.region && this.sellItem.region.regionCode) {
  849. const item = this.detailedRegion.find(
  850. region => region.region.regionCode === this.sellItem.region.regionCode
  851. );
  852. if (item) {
  853. list = item.children;
  854. }
  855. } else {
  856. list = this.resorts;
  857. }
  858. return _.sortBy(list, x => x.resortName);
  859. },
  860. isLoggedIn() {
  861. return this.user && this.person;
  862. },
  863. displayNotDeletedAgents() {
  864. var notDeletedArr = [];
  865. this.agents.forEach(agent => {
  866. if (!agent.isDeleted) {
  867. if (agent.agencyId === this.sellItem.agencyId) {
  868. notDeletedArr.push(agent);
  869. }
  870. }
  871. });
  872. return notDeletedArr;
  873. },
  874. CanSave() {
  875. if (this.indiv.howMarried === "In Community Of Property") {
  876. if (this.indiv.spouseName || this.indiv.spouseSurname || this.spouseEmail) {
  877. return true;
  878. }
  879. return false;
  880. }
  881. return true;
  882. }
  883. },
  884. methods: {
  885. ...mapActions("individual", ["getIndividual"]),
  886. ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
  887. ...mapActions("payment", ["addPayment"]),
  888. ...mapActions("bank", ["getBanks"]),
  889. newSale() {
  890. this.weekId = 0;
  891. this.getBlankWeek();
  892. },
  893. submitSale() {
  894. if (this.userLoggedIn) {
  895. this.sellItem.ownerObject = this.indiv;
  896. this.sellItem.status = undefined;
  897. this.sellItem.weekStatus = "For Sale";
  898. this.saveWeek(this.sellItem).then(fulfilled => {
  899. this.paygateRedirect();
  900. });
  901. } else {
  902. this.$router.push("/user/login");
  903. }
  904. },
  905. paygateRedirect() {
  906. var amount = this.getListingFee.amount;
  907. var paymentObj = {
  908. timeshareWeekId: this.sellItem.id, // this.sellItem.Id,
  909. propertyId: 0,
  910. creatydById: Log.getUser().id, //Log.getUser().id,
  911. amount: amount,
  912. paymentStatus: "",
  913. paymentToken: ""
  914. };
  915. this.addPayment(paymentObj).then(res => {
  916. this.$router.push({
  917. name: "PaymentGateway",
  918. params: {
  919. paymentReqId: res.PAY_REQUEST_ID,
  920. checksum: res.CHECKSUM
  921. }
  922. });
  923. });
  924. },
  925. previewFiles(event) {
  926. console.log(event.target.files);
  927. },
  928. changeRef() {
  929. this.sellItem.agent = undefined;
  930. this.sellItem.agency = undefined;
  931. this.sellItem.referedByAgent = !this.sellItem.referedByAgent;
  932. },
  933. changeLeviesPaidInFull() {
  934. this.sellItem.leviesPaidInFull = !this.sellItem.leviesPaidInFull;
  935. },
  936. changeWeekPlacedForRental() {
  937. this.sellItem.weekPlacedForRental = !this.sellItem.weekPlacedForRental;
  938. },
  939. changeCurrentBanked() {
  940. this.sellItem.bankedWith = undefined;
  941. this.sellItem.currentYearBanked = !this.sellItem.currentYearBanked;
  942. },
  943. resortChange() {
  944. this.onResortChange({
  945. resortName: this.sellItem.resort.resortName,
  946. resortCode: this.sellItem.resort.resortCode
  947. });
  948. if (this.sellItem && this.sellItem.resort === "Other") {
  949. this.sellItem.otherResortName = undefined;
  950. this.sellItem.otherResort = true;
  951. } else {
  952. this.sellItem.otherResortName = undefined;
  953. this.sellItem.otherResort = false;
  954. }
  955. },
  956. regionChange() {
  957. this.sellItem.regionId = this.sellItem.region ? this.sellItem.region.id : 1;
  958. },
  959. UpdateAddress(address) {
  960. this.indiv.address.streetNumber = address.streetNumber;
  961. this.indiv.address.street = address.streetName;
  962. this.indiv.address.province = address.province;
  963. this.indiv.address.city = address.city;
  964. this.indiv.address.suburb = address.suburb;
  965. this.indiv.address.postalCode = address.postalCode;
  966. },
  967. SetMandateDate() {
  968. if (this.sellItem.mandate) {
  969. this.sellItem.mandateDate = new Date();
  970. } else {
  971. this.sellItem.mandateDate = undefined;
  972. }
  973. }
  974. }
  975. };
  976. </script>
  977. <style lang="scss" scoped>
  978. .refbyAgent {
  979. will-change: transform;
  980. transition: height 500ms;
  981. height: 0px;
  982. }
  983. .refbyAgent--clicked {
  984. height: 150px;
  985. }
  986. .spacebanked1 {
  987. will-change: transform;
  988. transition: height 500ms;
  989. height: 0px;
  990. }
  991. .spacebanked1--clicked {
  992. height: 150px;
  993. }
  994. .custom-file-label {
  995. border-width: 2px;
  996. border-color: rgb(27, 117, 187);
  997. margin-bottom: 20px;
  998. }
  999. .custom-file-label::after {
  1000. border-left: none;
  1001. border-bottom: solid;
  1002. border-width: 2px;
  1003. border-color: rgb(27, 117, 187);
  1004. font-family: "Muli";
  1005. }
  1006. </style>