21175f930c3e5d91ffea3dcc86a98944b3b6a36c.php 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. <?php $__env->startSection('panel_content'); ?>
  2. <div class="aiz-titlebar mt-2 mb-4">
  3. <div class="row align-items-center">
  4. <div class="col-md-6">
  5. <h1 class="h3"><?php echo e(translate('Manage Profile')); ?></h1>
  6. </div>
  7. </div>
  8. </div>
  9. <form action="<?php echo e(route('seller.profile.update', $user->id)); ?>" method="POST" enctype="multipart/form-data">
  10. <input name="_method" type="hidden" value="POST">
  11. <?php echo csrf_field(); ?>
  12. <!-- Basic Info-->
  13. <div class="card">
  14. <div class="card-header">
  15. <h5 class="mb-0 h6"><?php echo e(translate('Basic Info')); ?></h5>
  16. </div>
  17. <div class="card-body">
  18. <div class="form-group row">
  19. <label class="col-md-2 col-form-label" for="name"><?php echo e(translate('Your Name')); ?></label>
  20. <div class="col-md-10">
  21. <input type="text" name="name" value="<?php echo e($user->name); ?>" id="name" class="form-control" placeholder="<?php echo e(translate('Your Name')); ?>" required>
  22. <?php $__errorArgs = ['name'];
  23. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  24. if ($__bag->has($__errorArgs[0])) :
  25. if (isset($message)) { $__messageOriginal = $message; }
  26. $message = $__bag->first($__errorArgs[0]); ?>
  27. <small class="form-text text-danger"><?php echo e($message); ?></small>
  28. <?php unset($message);
  29. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  30. endif;
  31. unset($__errorArgs, $__bag); ?>
  32. </div>
  33. </div>
  34. <div class="form-group row">
  35. <label class="col-md-2 col-form-label" for="phone"><?php echo e(translate('Your Phone')); ?></label>
  36. <div class="col-md-10">
  37. <input type="text" name="phone" value="<?php echo e($user->phone); ?>" id="phone" class="form-control" placeholder="<?php echo e(translate('Your Phone')); ?>">
  38. <?php $__errorArgs = ['phone'];
  39. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  40. if ($__bag->has($__errorArgs[0])) :
  41. if (isset($message)) { $__messageOriginal = $message; }
  42. $message = $__bag->first($__errorArgs[0]); ?>
  43. <small class="form-text text-danger"><?php echo e($message); ?></small>
  44. <?php unset($message);
  45. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  46. endif;
  47. unset($__errorArgs, $__bag); ?>
  48. </div>
  49. </div>
  50. <div class="form-group row">
  51. <label class="col-md-2 col-form-label"><?php echo e(translate('Photo')); ?></label>
  52. <div class="col-md-10">
  53. <div class="input-group" data-toggle="aizuploader" data-type="image">
  54. <div class="input-group-prepend">
  55. <div class="input-group-text bg-soft-secondary font-weight-medium"><?php echo e(translate('Browse')); ?></div>
  56. </div>
  57. <div class="form-control file-amount"><?php echo e(translate('Choose File')); ?></div>
  58. <input type="hidden" name="photo" value="<?php echo e($user->avatar_original); ?>" class="selected-files">
  59. </div>
  60. <div class="file-preview box sm">
  61. </div>
  62. </div>
  63. </div>
  64. <div class="form-group row">
  65. <label class="col-md-2 col-form-label" for="password"><?php echo e(translate('Your Password')); ?></label>
  66. <div class="col-md-10">
  67. <input type="password" name="new_password" id="password" class="form-control" placeholder="<?php echo e(translate('New Password')); ?>">
  68. <?php $__errorArgs = ['new_password'];
  69. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  70. if ($__bag->has($__errorArgs[0])) :
  71. if (isset($message)) { $__messageOriginal = $message; }
  72. $message = $__bag->first($__errorArgs[0]); ?>
  73. <small class="form-text text-danger"><?php echo e($message); ?></small>
  74. <?php unset($message);
  75. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  76. endif;
  77. unset($__errorArgs, $__bag); ?>
  78. </div>
  79. </div>
  80. <div class="form-group row">
  81. <label class="col-md-2 col-form-label" for="confirm_password"><?php echo e(translate('Confirm Password')); ?></label>
  82. <div class="col-md-10">
  83. <input type="password" name="confirm_password" id="confirm_password" class="form-control" placeholder="<?php echo e(translate('Confirm Password')); ?>" >
  84. <?php $__errorArgs = ['confirm_password'];
  85. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  86. if ($__bag->has($__errorArgs[0])) :
  87. if (isset($message)) { $__messageOriginal = $message; }
  88. $message = $__bag->first($__errorArgs[0]); ?>
  89. <small class="form-text text-danger"><?php echo e($message); ?></small>
  90. <?php unset($message);
  91. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  92. endif;
  93. unset($__errorArgs, $__bag); ?>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <!-- Payment System -->
  99. <div class="card">
  100. <div class="card-header">
  101. <h5 class="mb-0 h6"><?php echo e(translate('Payment Setting')); ?></h5>
  102. </div>
  103. <div class="card-body">
  104. <div class="row" id="cash">
  105. <label class="col-md-3 col-form-label"><?php echo e(translate('Cash Payment')); ?></label>
  106. <div class="col-md-9">
  107. <label class="aiz-switch aiz-switch-success mb-3">
  108. <input value="1" name="cash_on_delivery_status" type="checkbox" <?php if($user->shop->cash_on_delivery_status == 1): ?> checked <?php endif; ?>>
  109. <span class="slider round"></span>
  110. </label>
  111. </div>
  112. </div>
  113. <div class="row" id="bank">
  114. <label class="col-md-3 col-form-label"><?php echo e(translate('Bank Payment')); ?></label>
  115. <div class="col-md-9">
  116. <label class="aiz-switch aiz-switch-success mb-3">
  117. <input value="1" name="bank_payment_status" type="checkbox" <?php if($user->shop->bank_payment_status == 1): ?> checked <?php endif; ?>>
  118. <span class="slider round"></span>
  119. </label>
  120. </div>
  121. </div>
  122. <div class="row">
  123. <label class="col-md-3 col-form-label" for="bank_name"><?php echo e(translate('Bank Name')); ?></label>
  124. <div class="col-md-9">
  125. <input type="text" name="bank_name" value="<?php echo e($user->shop->bank_name); ?>" id="bank_name" class="form-control mb-3" placeholder="<?php echo e(translate('Bank Name')); ?>">
  126. <?php $__errorArgs = ['phone'];
  127. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  128. if ($__bag->has($__errorArgs[0])) :
  129. if (isset($message)) { $__messageOriginal = $message; }
  130. $message = $__bag->first($__errorArgs[0]); ?>
  131. <small class="form-text text-danger"><?php echo e($message); ?></small>
  132. <?php unset($message);
  133. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  134. endif;
  135. unset($__errorArgs, $__bag); ?>
  136. </div>
  137. </div>
  138. <div class="row">
  139. <label class="col-md-3 col-form-label" for="bank_acc_name"><?php echo e(translate('Bank Account Name')); ?></label>
  140. <div class="col-md-9">
  141. <input type="text" name="bank_acc_name" value="<?php echo e($user->shop->bank_acc_name); ?>" id="bank_acc_name" class="form-control mb-3" placeholder="<?php echo e(translate('Bank Account Name')); ?>">
  142. <?php $__errorArgs = ['bank_acc_name'];
  143. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  144. if ($__bag->has($__errorArgs[0])) :
  145. if (isset($message)) { $__messageOriginal = $message; }
  146. $message = $__bag->first($__errorArgs[0]); ?>
  147. <small class="form-text text-danger"><?php echo e($message); ?></small>
  148. <?php unset($message);
  149. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  150. endif;
  151. unset($__errorArgs, $__bag); ?>
  152. </div>
  153. </div>
  154. <div class="row">
  155. <label class="col-md-3 col-form-label" for="bank_acc_no"><?php echo e(translate('Bank Account Number')); ?></label>
  156. <div class="col-md-9">
  157. <input type="text" name="bank_acc_no" value="<?php echo e($user->shop->bank_acc_no); ?>" id="bank_acc_no" class="form-control mb-3" placeholder="<?php echo e(translate('Bank Account Number')); ?>">
  158. <?php $__errorArgs = ['bank_acc_no'];
  159. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  160. if ($__bag->has($__errorArgs[0])) :
  161. if (isset($message)) { $__messageOriginal = $message; }
  162. $message = $__bag->first($__errorArgs[0]); ?>
  163. <small class="form-text text-danger"><?php echo e($message); ?></small>
  164. <?php unset($message);
  165. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  166. endif;
  167. unset($__errorArgs, $__bag); ?>
  168. </div>
  169. </div>
  170. <div class="row">
  171. <label class="col-md-3 col-form-label" for="bank_routing_no"><?php echo e(translate('Bank Routing Number')); ?></label>
  172. <div class="col-md-9">
  173. <input type="number" name="bank_routing_no" value="<?php echo e($user->shop->bank_routing_no); ?>" id="bank_routing_no" lang="en" class="form-control mb-3" placeholder="<?php echo e(translate('Bank Routing Number')); ?>">
  174. <?php $__errorArgs = ['bank_routing_no'];
  175. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  176. if ($__bag->has($__errorArgs[0])) :
  177. if (isset($message)) { $__messageOriginal = $message; }
  178. $message = $__bag->first($__errorArgs[0]); ?>
  179. <small class="form-text text-danger"><?php echo e($message); ?></small>
  180. <?php unset($message);
  181. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  182. endif;
  183. unset($__errorArgs, $__bag); ?>
  184. </div>
  185. </div>
  186. <div class="row" id="usdt">
  187. <label class="col-md-3 col-form-label"><?php echo e(translate('USDT Payment')); ?></label>
  188. <div class="col-md-9">
  189. <label class="aiz-switch aiz-switch-success mb-3">
  190. <input value="1" name="usdt_payment_status" type="checkbox" <?php if($user->shop->usdt_payment_status == 1): ?> checked <?php endif; ?>>
  191. <span class="slider round"></span>
  192. </label>
  193. </div>
  194. </div>
  195. <div class="row">
  196. <label class="col-md-3 col-form-label" for="usdt_type"><?php echo e(translate('USDT Link')); ?></label>
  197. <div class="col-md-9">
  198. <input type="text" name="usdt_type" value="<?php echo e($user->shop->usdt_type); ?>" id="usdt_type" class="form-control mb-3" placeholder="<?php echo e(translate('USDT Link')); ?>">
  199. </div>
  200. </div>
  201. <div class="row">
  202. <label class="col-md-3 col-form-label" for="usdt_address"><?php echo e(translate('USDT Address')); ?></label>
  203. <div class="col-md-9">
  204. <input type="text" name="usdt_address" value="<?php echo e($user->shop->usdt_address); ?>" id="usdt_address" class="form-control mb-3" placeholder="<?php echo e(translate('USDT Address')); ?>">
  205. <?php $__errorArgs = ['usdt_address'];
  206. $__bag = $errors->getBag($__errorArgs[1] ?? 'default');
  207. if ($__bag->has($__errorArgs[0])) :
  208. if (isset($message)) { $__messageOriginal = $message; }
  209. $message = $__bag->first($__errorArgs[0]); ?>
  210. <small class="form-text text-danger"><?php echo e($message); ?></small>
  211. <?php unset($message);
  212. if (isset($__messageOriginal)) { $message = $__messageOriginal; }
  213. endif;
  214. unset($__errorArgs, $__bag); ?>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. <div class="form-group mb-0 text-right">
  220. <button type="submit" class="btn btn-primary"><?php echo e(translate('Update Profile')); ?></button>
  221. </div>
  222. </form>
  223. <br>
  224. <!-- Address -->
  225. <div class="card">
  226. <div class="card-header">
  227. <h5 class="mb-0 h6"><?php echo e(translate('Address')); ?></h5>
  228. </div>
  229. <div class="card-body">
  230. <div class="row gutters-10">
  231. <?php $__currentLoopData = $addresses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $address): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  232. <div class="col-lg-4">
  233. <div class="border p-3 pr-5 rounded mb-3 position-relative">
  234. <div>
  235. <span class="w-50 fw-600"><?php echo e(translate('Address')); ?>:</span>
  236. <span class="ml-2"><?php echo e($address->address); ?></span>
  237. </div>
  238. <div>
  239. <span class="w-50 fw-600"><?php echo e(translate('Postal Code')); ?>:</span>
  240. <span class="ml-2"><?php echo e($address->postal_code); ?></span>
  241. </div>
  242. <div>
  243. <span class="w-50 fw-600"><?php echo e(translate('City')); ?>:</span>
  244. <span class="ml-2"><?php echo e(optional($address->city)->name); ?></span>
  245. </div>
  246. <div>
  247. <span class="w-50 fw-600"><?php echo e(translate('State')); ?>:</span>
  248. <span class="ml-2"><?php echo e(optional($address->state)->name); ?></span>
  249. </div>
  250. <div>
  251. <span class="w-50 fw-600"><?php echo e(translate('Country')); ?>:</span>
  252. <span class="ml-2"><?php echo e(optional($address->country)->name); ?></span>
  253. </div>
  254. <div>
  255. <span class="w-50 fw-600"><?php echo e(translate('Phone')); ?>:</span>
  256. <span class="ml-2"><?php echo e($address->phone); ?></span>
  257. </div>
  258. <?php if($address->set_default): ?>
  259. <div class="position-absolute right-0 bottom-0 pr-2 pb-3">
  260. <span class="badge badge-inline badge-primary"><?php echo e(translate('Default')); ?></span>
  261. </div>
  262. <?php endif; ?>
  263. <div class="dropdown position-absolute right-0 top-0">
  264. <button class="btn bg-gray px-2" type="button" data-toggle="dropdown">
  265. <i class="la la-ellipsis-v"></i>
  266. </button>
  267. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
  268. <a class="dropdown-item" onclick="edit_address('<?php echo e($address->id); ?>')">
  269. <?php echo e(translate('Edit')); ?>
  270. </a>
  271. <?php if(!$address->set_default): ?>
  272. <a class="dropdown-item" href="<?php echo e(route('seller.addresses.set_default', $address->id)); ?>"><?php echo e(translate('Make This Default')); ?></a>
  273. <?php endif; ?>
  274. <a class="dropdown-item" href="<?php echo e(route('seller.addresses.destroy', $address->id)); ?>"><?php echo e(translate('Delete')); ?></a>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  280. <div class="col-lg-4 mx-auto" onclick="add_new_address()">
  281. <div class="border p-3 rounded mb-3 c-pointer text-center bg-light">
  282. <i class="la la-plus la-2x"></i>
  283. <div class="alpha-7"><?php echo e(translate('Add New Address')); ?></div>
  284. </div>
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. <!-- Change Email -->
  290. <form action="<?php echo e(route('user.change.email')); ?>" method="POST">
  291. <?php echo csrf_field(); ?>
  292. <div class="card">
  293. <div class="card-header">
  294. <h5 class="mb-0 h6"><?php echo e(translate('Change your email')); ?></h5>
  295. </div>
  296. <div class="card-body">
  297. <div class="row">
  298. <div class="col-md-2">
  299. <label><?php echo e(translate('Your Email')); ?></label>
  300. </div>
  301. <div class="col-md-10">
  302. <div class="input-group mb-3">
  303. <input type="email" class="form-control" placeholder="<?php echo e(translate('Your Email')); ?>" name="email" value="<?php echo e($user->email); ?>" />
  304. <div class="input-group-append">
  305. <button type="button" class="btn btn-outline-secondary new-email-verification">
  306. <span class="d-none loading">
  307. <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span><?php echo e(translate('Sending Email...')); ?>
  308. </span>
  309. <span class="default"><?php echo e(translate('Verify')); ?></span>
  310. </button>
  311. </div>
  312. </div>
  313. <div class="form-group mb-0 text-right">
  314. <button type="submit" class="btn btn-primary"><?php echo e(translate('Update Email')); ?></button>
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. </form>
  321. <?php $__env->stopSection(); ?>
  322. <?php $__env->startSection('modal'); ?>
  323. <div class="modal fade" id="new-address-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  324. <div class="modal-dialog modal-dialog-centered" role="document">
  325. <div class="modal-content">
  326. <div class="modal-header">
  327. <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate('New Address')); ?></h5>
  328. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  329. <span aria-hidden="true">&times;</span>
  330. </button>
  331. </div>
  332. <form class="form-default" role="form" action="<?php echo e(route('seller.addresses.store')); ?>" method="POST">
  333. <?php echo csrf_field(); ?>
  334. <div class="modal-body">
  335. <div class="p-3">
  336. <div class="row">
  337. <div class="col-md-2">
  338. <label><?php echo e(translate('Address')); ?></label>
  339. </div>
  340. <div class="col-md-10">
  341. <textarea class="form-control mb-3" placeholder="<?php echo e(translate('Your Address')); ?>" rows="2" name="address" required></textarea>
  342. </div>
  343. </div>
  344. <div class="row">
  345. <div class="col-md-2">
  346. <label><?php echo e(translate('Country')); ?></label>
  347. </div>
  348. <div class="col-md-10">
  349. <div class="mb-3">
  350. <select class="form-control aiz-selectpicker" data-live-search="true" data-placeholder="<?php echo e(translate('Select your country')); ?>" name="country_id" required>
  351. <option value=""><?php echo e(translate('Select your country')); ?></option>
  352. <?php $__currentLoopData = \App\Models\Country::where('status', 1)->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  353. <option value="<?php echo e($country->id); ?>"><?php echo e($country->name); ?></option>
  354. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  355. </select>
  356. </div>
  357. </div>
  358. </div>
  359. <div class="row">
  360. <div class="col-md-2">
  361. <label><?php echo e(translate('State')); ?></label>
  362. </div>
  363. <div class="col-md-10">
  364. <select class="form-control mb-3 aiz-selectpicker" data-live-search="true" name="state_id" required>
  365. </select>
  366. </div>
  367. </div>
  368. <div class="row">
  369. <div class="col-md-2">
  370. <label><?php echo e(translate('City')); ?></label>
  371. </div>
  372. <div class="col-md-10">
  373. <select class="form-control mb-3 aiz-selectpicker" data-live-search="true" name="city_id" required>
  374. </select>
  375. </div>
  376. </div>
  377. <?php if(get_setting('google_map') == 1): ?>
  378. <div class="row">
  379. <input id="searchInput" class="controls" type="text" placeholder="<?php echo e(translate('Enter a location')); ?>">
  380. <div id="map"></div>
  381. <ul id="geoData">
  382. <li style="display: none;"><?php echo e(translate('Full Address')); ?>: <span id="location"></span></li>
  383. <li style="display: none;"><?php echo e(translate('Postal Code')); ?>: <span id="postal_code"></span></li>
  384. <li style="display: none;"><?php echo e(translate('Country')); ?>: <span id="country"></span></li>
  385. <li style="display: none;"><?php echo e(translate('Latitude')); ?>: <span id="lat"></span></li>
  386. <li style="display: none;"><?php echo e(translate('Longitude')); ?>: <span id="lon"></span></li>
  387. </ul>
  388. </div>
  389. <div class="row">
  390. <div class="col-md-2" id="">
  391. <label for="exampleInputuname"><?php echo e(translate('Longitude')); ?></label>
  392. </div>
  393. <div class="col-md-10" id="">
  394. <input type="text" class="form-control mb-3" id="longitude" name="longitude" readonly="">
  395. </div>
  396. </div>
  397. <div class="row">
  398. <div class="col-md-2" id="">
  399. <label for="exampleInputuname"><?php echo e(translate('Latitude')); ?></label>
  400. </div>
  401. <div class="col-md-10" id="">
  402. <input type="text" class="form-control mb-3" id="latitude" name="latitude" readonly="">
  403. </div>
  404. </div>
  405. <?php endif; ?>
  406. <div class="row">
  407. <div class="col-md-2">
  408. <label><?php echo e(translate('Postal code')); ?></label>
  409. </div>
  410. <div class="col-md-10">
  411. <input type="text" class="form-control mb-3" placeholder="<?php echo e(translate('Your Postal Code')); ?>" name="postal_code" value="" required>
  412. </div>
  413. </div>
  414. <div class="row">
  415. <div class="col-md-2">
  416. <label><?php echo e(translate('Phone')); ?></label>
  417. </div>
  418. <div class="col-md-10">
  419. <input type="text" class="form-control mb-3" placeholder="<?php echo e(translate('+880')); ?>" name="phone" value="" required>
  420. </div>
  421. </div>
  422. <div class="form-group text-right">
  423. <button type="submit" class="btn btn-sm btn-primary"><?php echo e(translate('Save')); ?></button>
  424. </div>
  425. </div>
  426. </div>
  427. </form>
  428. </div>
  429. </div>
  430. </div>
  431. <div class="modal fade" id="edit-address-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  432. <div class="modal-dialog modal-dialog-centered" role="document">
  433. <div class="modal-content">
  434. <div class="modal-header">
  435. <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate('New Address')); ?></h5>
  436. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  437. <span aria-hidden="true">&times;</span>
  438. </button>
  439. </div>
  440. <div class="modal-body" id="edit_modal_body">
  441. </div>
  442. </div>
  443. </div>
  444. </div>
  445. <?php $__env->stopSection(); ?>
  446. <?php $__env->startSection('script'); ?>
  447. <script type="text/javascript">
  448. $('.new-email-verification').on('click', function() {
  449. $(this).find('.loading').removeClass('d-none');
  450. $(this).find('.default').addClass('d-none');
  451. var email = $("input[name=email]").val();
  452. $.post('<?php echo e(route('user.new.verify')); ?>', {_token:'<?php echo e(csrf_token()); ?>', email: email}, function(data){
  453. data = JSON.parse(data);
  454. $('.default').removeClass('d-none');
  455. $('.loading').addClass('d-none');
  456. if(data.status == 2)
  457. AIZ.plugins.notify('warning', data.message);
  458. else if(data.status == 1)
  459. AIZ.plugins.notify('success', data.message);
  460. else
  461. AIZ.plugins.notify('danger', data.message);
  462. });
  463. });
  464. function add_new_address(){
  465. $('#new-address-modal').modal('show');
  466. }
  467. function edit_address(address) {
  468. var url = '<?php echo e(route("seller.addresses.edit", ":id")); ?>';
  469. url = url.replace(':id', address);
  470. $.ajax({
  471. headers: {
  472. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  473. },
  474. url: url,
  475. type: 'GET',
  476. success: function (response) {
  477. $('#edit_modal_body').html(response.html);
  478. $('#edit-address-modal').modal('show');
  479. AIZ.plugins.bootstrapSelect('refresh');
  480. <?php if(get_setting('google_map') == 1): ?>
  481. var lat = -33.8688;
  482. var long = 151.2195;
  483. if(response.data.address_data.latitude && response.data.address_data.longitude) {
  484. lat = response.data.address_data.latitude;
  485. long = response.data.address_data.longitude;
  486. }
  487. initialize(lat, long, 'edit_');
  488. <?php endif; ?>
  489. }
  490. });
  491. }
  492. $(document).on('change', '[name=country_id]', function() {
  493. var country_id = $(this).val();
  494. get_states(country_id);
  495. });
  496. $(document).on('change', '[name=state_id]', function() {
  497. var state_id = $(this).val();
  498. get_city(state_id);
  499. });
  500. function get_states(country_id) {
  501. $('[name="state"]').html("");
  502. $.ajax({
  503. headers: {
  504. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  505. },
  506. url: "<?php echo e(route('seller.get-state')); ?>",
  507. type: 'POST',
  508. data: {
  509. country_id : country_id
  510. },
  511. success: function (response) {
  512. var obj = JSON.parse(response);
  513. if(obj != '') {
  514. $('[name="state_id"]').html(obj);
  515. AIZ.plugins.bootstrapSelect('refresh');
  516. }
  517. }
  518. });
  519. }
  520. function get_city(state_id) {
  521. $('[name="city"]').html("");
  522. $.ajax({
  523. headers: {
  524. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  525. },
  526. url: "<?php echo e(route('seller.get-city')); ?>",
  527. type: 'POST',
  528. data: {
  529. state_id: state_id
  530. },
  531. success: function (response) {
  532. var obj = JSON.parse(response);
  533. if(obj != '') {
  534. $('[name="city_id"]').html(obj);
  535. AIZ.plugins.bootstrapSelect('refresh');
  536. }
  537. }
  538. });
  539. }
  540. </script>
  541. <?php if(get_setting('google_map') == 1): ?>
  542. <?php echo $__env->make('frontend.partials.google_map', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  543. <?php endif; ?>
  544. <?php $__env->stopSection(); ?>
  545. <?php echo $__env->make('seller.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/seller/profile/index.blade.php ENDPATH**/ ?>