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.

contentSection.vue 36KB

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