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.

navBar.vue 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. <template>
  2. <div>
  3. <!-- <button type="button" id="mobile-nav-toggle">
  4. <i class="fa fa-bars"></i>
  5. </button>-->
  6. <div>
  7. <header id="header" style="width: 100%; position: fixed; top:0px; z-index: 50;">
  8. <div class="container">
  9. <div class="row">
  10. <div id="logo" class="col-md-3 col-xs-4 pull-left">
  11. <a href="/">
  12. <img
  13. class="img-fluid"
  14. src="/img/logos/UVProp.png"
  15. alt="UVProp logo"
  16. style="height:100px;"
  17. />
  18. </a>
  19. </div>
  20. <div id="topbar" class="col-md-9">
  21. <div class="container clearFix">
  22. <div class="social-links">
  23. <a href="mailto:info@univateproperties.co.za">
  24. <i class="fa fa-envelope"></i>
  25. </a>
  26. <a href="https://www.facebook.com/univateproperties/" target="_blank">
  27. <i class="fa fa-facebook"></i>
  28. </a>
  29. <a href="#">
  30. <i class="fa fa-youtube"></i>
  31. </a>
  32. <a href="tel:0123456789">
  33. <i class="fa fa-phone"></i>
  34. <span class="phoneIconDetail">+27 (0) 12 492 1238</span>
  35. </a>
  36. <a href="#" data-toggle="modal" data-target="#bondcal">
  37. <i class="fa fa-calculator" aria-hidden="true"></i>
  38. <span class="bondCalculatorDetail">Bond Calculator</span>
  39. </a>
  40. <router-link to="/property/list">
  41. <i class="fa fa-home"></i>
  42. <span class="listProp">List Property</span>
  43. </router-link>
  44. </div>
  45. </div>
  46. <nav id="nav-menu-container">
  47. <ul class="nav-menu sf-js-enabled sf-arrows">
  48. <li style="margin-left:-20px">
  49. <router-link to="/property/commercial">Commercial</router-link>
  50. <!-- <div
  51. @mouseover="commercialClass = 'ts-display'"
  52. @mouseleave="commercialClass = 'no-display'"
  53. ></div>
  54. <a href="#" class="sf-with-ul">
  55. Commercial
  56. </a>
  57. <ul style="margin-top:-10px; text-align:left" :class="commercialClass">
  58. <li>
  59. </li>
  60. <hr />
  61. <li>
  62. <a href="#" @click="routerGoTo('/property/commercial/new/Sale')">To Sell</a>
  63. </li>
  64. <li>
  65. <a href="#" @click="routerGoTo('/property/commercial/new/Rental')"
  66. >To Rent</a
  67. >
  68. </li>
  69. </ul>-->
  70. </li>
  71. <li class="mx-1">
  72. <router-link to="/property/residential">Residential</router-link>
  73. <!-- <div
  74. @mouseover="residentialClass = 'ts-display'"
  75. @mouseleave="residentialClass = 'no-display'"
  76. ></div>
  77. <a href="#" class="sf-with-ul">
  78. Residential
  79. </a>
  80. <ul style="margin-top:-10px; text-align:left" :class="residentialClass">
  81. <li>
  82. <router-link to="/property/residential">To Buy / To Rent</router-link>
  83. </li>
  84. <hr />
  85. <li>
  86. <a href="#" @click="routerGoTo('/property/residential/new/Sale')"
  87. >To Sell</a
  88. >
  89. </li>
  90. <li>
  91. <a href="#" @click="routerGoTo('/property/residential/new/Rental')"
  92. >To Rent</a
  93. >
  94. </li>
  95. </ul>-->
  96. </li>
  97. <li class="menu-has-children mx-1">
  98. <div
  99. @mouseover="timeShareClass = 'ts-display'"
  100. @mouseleave="timeShareClass = 'no-display'"
  101. ></div>
  102. <a href="#" class="sf-with-ul">Timeshare</a>
  103. <ul style="margin-top:-10px;text-align:left" :class="timeShareClass">
  104. <li>
  105. <router-link to="/timeshare/buy">To Buy</router-link>
  106. </li>
  107. <li>
  108. <router-link to="/timeshare/sell">To Sell</router-link>
  109. </li>
  110. <li>
  111. <router-link to="/timeshare/faq">FAQ</router-link>
  112. </li>
  113. <li v-if="isLoggedIn">
  114. <hr />
  115. <router-link to="/timeshare/myWeeks">My Timeshare Weeks</router-link>
  116. </li>
  117. </ul>
  118. </li>
  119. <!-- <li class="menu-has-children">
  120. <div
  121. @mouseover="propertiesClass = 'ts-display'"
  122. @mouseleave="propertiesClass = 'no-display'"
  123. ></div>
  124. <a href="#" class="sf-with-ul">
  125. Properties
  126. </a>
  127. <ul style="margin-top:-10px;text-align:left" :class="propertiesClass">
  128. <li>
  129. <router-link to="/property/Search">Search</router-link>
  130. </li>
  131. <li>
  132. <router-link to="/property/new/Sale">To Sell</router-link>
  133. </li>
  134. <li>
  135. <router-link to="/property/new/Rental">To Rent</router-link>
  136. </li>
  137. <li v-if="isLoggedIn">
  138. <hr />
  139. <router-link to="/properties">My Properties</router-link>
  140. </li>
  141. </ul>
  142. </li>-->
  143. <li class="menu-has-children mx-1">
  144. <div
  145. @mouseover="propManClass = 'ts-display'"
  146. @mouseleave="propManClass = 'no-display'"
  147. ></div>
  148. <a href="#" class="sf-with-ul">Property Management</a>
  149. <ul style="margin-top:-10px; text-align:left" :class="propManClass">
  150. <li>
  151. <router-link to="/propertyManagement">Sectional Title and HOA Management</router-link>
  152. </li>
  153. <li>
  154. <router-link
  155. to="/rentalPropertyManagement"
  156. >Rental Property Portfolio Management</router-link>
  157. </li>
  158. </ul>
  159. </li>
  160. <li class="menu-has-children mx-1">
  161. <div
  162. @mouseover="aboutClass = 'ts-display'"
  163. @mouseleave="aboutClass = 'no-display'"
  164. ></div>
  165. <a href="#" class="sf-with-ul">About</a>
  166. <ul style="margin-top:-10px; text-align:left" :class="aboutClass">
  167. <li>
  168. <router-link to="/about/us">About Us</router-link>
  169. </li>
  170. <li>
  171. <router-link to="/about/timeshare">About Timeshare Resales</router-link>
  172. </li>
  173. </ul>
  174. </li>
  175. <li class="mx-1">
  176. <router-link to="/share/contact">Contact Us</router-link>
  177. </li>
  178. <li v-if="USER" class="menu-has-children mx-1">
  179. <div
  180. @mouseover="userClass = 'ts-display'"
  181. @mouseleave="userClass = 'no-display'"
  182. ></div>
  183. <a href="#" class="sf-with-ul">{{ NAME }}</a>
  184. <ul style="margin-top:-10px;text-align:left" :class="userClass">
  185. <!-- <li v-if="ROLE === 'Super Admin'">
  186. <router-link to="/property/list">List Property</router-link>
  187. </li>
  188. <li v-if="ROLE === 'Super Admin'">
  189. <router-link to="/status/list">Status</router-link>
  190. </li>-->
  191. <li v-if="ROLE === 'Super Admin'"></li>
  192. <li>
  193. <router-link to="/property/list">List My Property</router-link>
  194. </li>
  195. <li v-if="ROLE === 'Super Admin'">
  196. <router-link to="/status/timeshareAdmin">Timeshare Week Admin</router-link>
  197. </li>
  198. <li v-if="ROLE === 'Super Admin'">
  199. <router-link to="/status/tenderWeekAdmin">Tender Week Management</router-link>
  200. </li>
  201. <!-- <li v-if="ROLE === 'Super Admin'">
  202. <router-link to="/unitConfiguration/list">Unit Configuration</router-link>
  203. </li>-->
  204. <!-- <li v-if="ROLE === 'Super Admin'">
  205. <router-link to="/communication/template">Templates</router-link>
  206. </li>-->
  207. <!-- <hr />
  208. <li v-if="ROLE === 'Super Admin'">
  209. <router-link to="/status/userManagementPage"
  210. >User Management & Access</router-link
  211. >
  212. </li>-->
  213. <!-- <li v-if="ROLE === 'Super Admin'">
  214. <router-link to="/status/changeLogPage">Changes Logs</router-link>
  215. </li>
  216. <li v-if="ROLE === 'Super Admin'">
  217. <router-link to="/userDefinedGroups/list"
  218. >Property User Defined Groups</router-link
  219. >
  220. </li>
  221. <li v-if="ROLE === 'Super Admin'">
  222. <router-link to="/propertyTypes/list">Property Types</router-link>
  223. </li>
  224. <hr />
  225. <li v-if="ROLE === 'Super Admin'">
  226. <router-link to="/searchLog">Search Logs</router-link>
  227. </li>
  228. <li v-if="ROLE === 'Super Admin'">
  229. <hr />
  230. </li>-->
  231. <hr v-if="ROLE === 'Super Admin'" />
  232. <li v-if="ROLE === 'Super Admin'" class="menu-has-children">
  233. <div
  234. @mouseover="submenu1Class = 'ts-display'"
  235. @mouseleave="submenu1Class = 'no-display'"
  236. ></div>
  237. <a href="#" class="sf-with-ul">Website Setup</a>
  238. <ul
  239. style="margin-top:-10px;text-align:left;width:250px"
  240. :class="submenu1Class"
  241. >
  242. <li>
  243. <router-link to="/status/list">Status</router-link>
  244. </li>
  245. <li>
  246. <router-link to="/unitConfiguration/list">Unit Configuration</router-link>
  247. </li>
  248. <li>
  249. <router-link to="/communication/template">Templates</router-link>
  250. </li>
  251. <li>
  252. <router-link to="/status/userManagementPage">User Management & Access</router-link>
  253. </li>
  254. <li>
  255. <router-link to="/userDefinedGroups/list">Property User Defined Groups</router-link>
  256. </li>
  257. <li>
  258. <router-link to="/PropertyAdmin">Property Admin</router-link>
  259. </li>
  260. <li>
  261. <router-link to="/propertyTypes/list">Property Types</router-link>
  262. </li>
  263. <li>
  264. <router-link to="/fees">Fees</router-link>
  265. </li>
  266. <li>
  267. <router-link to="/termsConditions">Edit Terms and Conditions</router-link>
  268. </li>
  269. <li>
  270. <router-link to="/UserRoles">User Roles</router-link>
  271. </li>
  272. </ul>
  273. </li>
  274. <li v-if="ROLE === 'Super Admin'" class="menu-has-children">
  275. <div
  276. @mouseover="submenu1Class = 'ts-display'"
  277. @mouseleave="submenu1Class = 'no-display'"
  278. ></div>
  279. <a href="#" class="sf-with-ul">Logs</a>
  280. <ul
  281. style="margin-top:-10px;text-align:left;width:250px"
  282. :class="submenu1Class"
  283. >
  284. <li>
  285. <router-link to="/status/changeLogPage">Changes Logs</router-link>
  286. </li>
  287. <li>
  288. <router-link to="/searchLog">Search Logs</router-link>
  289. </li>
  290. </ul>
  291. </li>
  292. <hr v-if="ROLE === 'Super Admin'" />
  293. <li>
  294. <router-link to="/Offers">Offers</router-link>
  295. </li>
  296. <!-- <li v-if="ROLE === 'Super Admin'">
  297. <router-link to="/Carousel">Carousel</router-link>
  298. </li>-->
  299. <li v-if="ROLE === 'Super Admin'">
  300. <router-link to="/user/updateProfileInfo">Update Info</router-link>
  301. </li>
  302. <li v-if="ROLE === 'Super Admin'">
  303. <router-link to="/payments">Payments</router-link>
  304. </li>
  305. <li v-if="ROLE === 'Super Admin'">
  306. <router-link to="/landingPages">Landing Pages / Campaignes</router-link>
  307. </li>
  308. <li>
  309. <router-link class="btn-white-border p-2" to="/user/login">Logout</router-link>
  310. </li>
  311. </ul>
  312. </li>
  313. <li v-if="!USER">
  314. <router-link class="btn-white-border p-2 ml-1 mr-1" to="/user/login">Login</router-link>
  315. </li>
  316. <li v-if="!USER">
  317. <router-link class="btn-solid-blue pt-2 pb-2" to="/user/register">Register</router-link>
  318. </li>
  319. <!-- <li v-if="!isLoggedIn" class="menu-has-children">
  320. <div
  321. @mouseover="registerClass = 'ts-display'"
  322. @mouseleave="registerClass = 'no-display'"
  323. ></div>
  324. <a href="#" class="sf-with-ul btn-solid-blue pt-2 pb-1" style="height:39px;">
  325. Register
  326. </a>
  327. <ul style="margin-top:-10px;" :class="registerClass">
  328. <li>
  329. <router-link to="/user/register">Register</router-link>
  330. </li>
  331. <li>
  332. <router-link to="/user/registeragency">Agency Registration</router-link>
  333. </li>
  334. </ul>
  335. </li>-->
  336. </ul>
  337. </nav>
  338. </div>
  339. </div>
  340. </div>
  341. </header>
  342. </div>
  343. <div
  344. class="modal fade"
  345. id="bondcal"
  346. tabindex="-1"
  347. role="dialog"
  348. aria-labelledby="modal-bondcal"
  349. >
  350. <div class="modal-dialog" role="document">
  351. <div class="modal-content pt-4">
  352. <div class="modal-header">
  353. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  354. <span aria-hidden="true">&times;</span>
  355. </button>
  356. </div>
  357. <div class="modal-body pt-3">
  358. <bondCalculator />
  359. </div>
  360. </div>
  361. <!-- modal-content -->
  362. </div>
  363. <!-- modal-dialog -->
  364. </div>
  365. <!-- modal -->
  366. </div>
  367. </template>
  368. <script>
  369. /* eslint-disable */
  370. import { mapState, mapActions } from "vuex";
  371. import Log from "../../assets/Log";
  372. import bondCalculator from "../misc/bondCaclculator";
  373. export default {
  374. components: {
  375. bondCalculator
  376. },
  377. data() {
  378. return {
  379. hover: false,
  380. timeShareClass: "no-display",
  381. propertiesClass: "no-display",
  382. aboutClass: "no-display",
  383. userClass: "no-display",
  384. registerClass: "no-display",
  385. commercialClass: "no-display",
  386. residentialClass: "no-display",
  387. propManClass: "no-display",
  388. submenu1Class: "no-display"
  389. };
  390. },
  391. methods: {
  392. ...mapActions("authentication", ["logout"]),
  393. ...mapActions("fees", ["retrieveListingFee"]),
  394. showDropDown() {
  395. if (!this.hover) {
  396. this.timeShareClass = "ts-display";
  397. }
  398. },
  399. routerGoTo(goTo) {
  400. this.$emit("routerGoTo", goTo);
  401. }
  402. },
  403. mounted() {
  404. this.retrieveListingFee();
  405. },
  406. computed: {
  407. ...mapState("authentication", [
  408. "user",
  409. "flag",
  410. "status",
  411. "person",
  412. "token"
  413. ]),
  414. isLoggedIn() {
  415. return Log.isLoggedIn();
  416. },
  417. NAME() {
  418. return Log.getPerson().name;
  419. },
  420. USER() {
  421. var userObj = {};
  422. if (!this.user) {
  423. userObj = JSON.parse(localStorage.getItem("user"));
  424. } else {
  425. userObj = this.user;
  426. }
  427. return userObj;
  428. },
  429. ROLE() {
  430. var userObj = JSON.parse(localStorage.getItem("user"));
  431. return userObj.role;
  432. },
  433. // eslint-disable-next-line vue/return-in-computed-property
  434. Logout() {
  435. this.logout().then(res => {
  436. console.log("something");
  437. });
  438. //return this.logout();
  439. }
  440. }
  441. };
  442. </script>
  443. <style lang="scss" scoped>
  444. .subItem {
  445. background-color: white;
  446. margin-top: -10px;
  447. }
  448. .no-display {
  449. display: none;
  450. }
  451. .ts-display {
  452. display: block;
  453. }
  454. .phoneIconDetail {
  455. margin-left: 3px;
  456. }
  457. .bondCalculatorDetail {
  458. margin-left: 3px;
  459. }
  460. .listProp {
  461. margin-left: 3px;
  462. }
  463. /* Extra small devices (phones, 600px and down) */
  464. @media only screen and (max-width: 600px) {
  465. .phoneIconDetail {
  466. display: none;
  467. }
  468. .bondCalculatorDetail {
  469. display: none;
  470. }
  471. .listProp {
  472. display: none;
  473. }
  474. #header {
  475. min-height: 120px;
  476. }
  477. }
  478. /* Small devices (portrait tablets and large phones, 600px and up) */
  479. @media only screen and (min-width: 600px) {
  480. #header {
  481. min-height: 145px;
  482. }
  483. }
  484. /* Medium devices (landscape tablets, 768px and up) */
  485. @media only screen and (min-width: 768px) {
  486. #header {
  487. height: 170px;
  488. }
  489. }
  490. /* Large devices (laptops/desktops, 992px and up) */
  491. @media only screen and (min-width: 992px) {
  492. #header {
  493. height: 165px;
  494. }
  495. }
  496. /* Extra large devices (large laptops and desktops, 1200px and up) */
  497. @media only screen and (min-width: 1200px) {
  498. #header {
  499. height: 120px;
  500. }
  501. }
  502. </style>