admin-users-edit.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. <template lang='pug'>
  2. v-container(fluid, grid-list-lg)
  3. v-layout(row, wrap)
  4. v-flex(xs12)
  5. .admin-header
  6. img.animated.fadeInUp(src='/svg/icon-male-user.svg', alt='Edit User', style='width: 80px;')
  7. .admin-header-title
  8. .headline.blue--text.text--darken-2.animated.fadeInLeft Edit User
  9. .subtitle-1.grey--text.animated.fadeInLeft.wait-p2s {{user.name}}
  10. v-spacer
  11. .caption.grey--text.animated.fadeInRight.wait-p5s ID #[strong {{user.id}}]
  12. v-divider.animated.fadeInRight.wait-p3s.ml-3(vertical)
  13. v-btn.ml-3.animated.fadeInDown.wait-p2s(color='grey', large, outlined, to='/users')
  14. v-icon mdi-arrow-left
  15. v-dialog(v-model='deleteUserDialog', max-width='500', v-if='user.id !== currentUserId && !user.isSystem')
  16. template(v-slot:activator='{ on }')
  17. v-btn.ml-3.animated.fadeInDown.wait-p1s(color='red', large, outlined, v-on='on')
  18. v-icon(color='red') mdi-trash-can-outline
  19. v-card
  20. .dialog-header.is-red Delete User?
  21. v-card-text Are you sure you want to delete user #[strong {{ user.name }}]?
  22. v-card-actions
  23. v-spacer
  24. v-btn(text, @click='deleteUserDialog = false') Cancel
  25. v-btn(color='red', dark, @click='deleteUser') Delete
  26. v-btn.ml-3.animated.fadeInDown(color='primary', large, depressed, @click='updateUser')
  27. v-icon(left) mdi-check
  28. span Update User
  29. v-flex(xs6)
  30. v-card.animated.fadeInUp
  31. v-toolbar(color='primary', dense, dark, flat)
  32. v-icon.mr-2 mdi-information-variant
  33. span Basic Info
  34. v-list.py-0(two-line, dense)
  35. v-list-item
  36. v-list-item-avatar(size='32')
  37. v-icon mdi-email-variant
  38. v-list-item-content
  39. v-list-item-title Email
  40. v-list-item-subtitle {{ user.email }}
  41. v-list-item-action(v-if='!user.isSystem')
  42. v-menu(
  43. v-model='editPop.email'
  44. :close-on-content-click='false'
  45. min-width='350'
  46. left
  47. )
  48. template(v-slot:activator='{ on }')
  49. v-btn(icon, color='grey', x-small, v-on='on', @click='focusField(`iptEmail`)')
  50. v-icon mdi-pencil
  51. v-card
  52. v-text-field(
  53. ref='iptEmail'
  54. v-model='user.email'
  55. label='Email'
  56. solo
  57. hide-details
  58. append-icon='mdi-check'
  59. @click:append='editPop.email = false'
  60. @keydown.enter='editPop.email = false'
  61. @keydown.esc='editPop.email = false'
  62. )
  63. v-divider
  64. v-list-item
  65. v-list-item-avatar(size='32')
  66. v-icon mdi-account
  67. v-list-item-content
  68. v-list-item-title Display Name
  69. v-list-item-subtitle {{ user.name }}
  70. v-list-item-action
  71. v-menu(
  72. v-model='editPop.name'
  73. :close-on-content-click='false'
  74. min-width='350'
  75. left
  76. )
  77. template(v-slot:activator='{ on }')
  78. v-btn(icon, color='grey', x-small, v-on='on', @click='focusField(`iptDisplayName`)')
  79. v-icon mdi-pencil
  80. v-card
  81. v-text-field(
  82. ref='iptDisplayName'
  83. v-model='user.name'
  84. label='Display Name'
  85. solo
  86. hide-details
  87. append-icon='mdi-check'
  88. @click:append='editPop.name = false'
  89. @keydown.enter='editPop.name = false'
  90. @keydown.esc='editPop.name = false'
  91. )
  92. v-card.mt-3.animated.fadeInUp.wait-p2s(v-if='!user.isSystem')
  93. v-toolbar(color='primary', dense, dark, flat)
  94. v-icon.mr-2 mdi-lock-outline
  95. span Authentication
  96. v-list.py-0(two-line, dense)
  97. v-list-item
  98. v-list-item-avatar(size='32')
  99. v-icon mdi-domain
  100. v-list-item-content
  101. v-list-item-title Provider
  102. v-list-item-subtitle {{ user.providerKey }}
  103. //- v-list-item-action
  104. //- v-img(src='https://static.requarks.io/logo/wikijs.svg', alt='', contain, max-height='32', position='center right')
  105. template(v-if='user.providerKey === `local`')
  106. v-divider
  107. v-list-item
  108. v-list-item-avatar(size='32')
  109. v-icon mdi-textbox-password
  110. v-list-item-content
  111. v-list-item-title Password
  112. v-list-item-subtitle &bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;
  113. v-list-item-action
  114. v-tooltip(top)
  115. template(v-slot:activator='{ on }')
  116. v-btn(icon, color='grey', x-small, v-on='on')
  117. v-icon mdi-cached
  118. span Change Password
  119. v-list-item-action
  120. v-tooltip(top)
  121. template(v-slot:activator='{ on }')
  122. v-btn(icon, color='grey', x-small, v-on='on')
  123. v-icon mdi-email
  124. span Send Password Reset Email
  125. v-divider
  126. v-list-item
  127. v-list-item-avatar(size='32')
  128. v-icon mdi-two-factor-authentication
  129. v-list-item-content
  130. v-list-item-title Two Factor Authentication (2FA)
  131. v-list-item-subtitle.red--text Inactive
  132. v-list-item-action
  133. v-tooltip(top)
  134. template(v-slot:activator='{ on }')
  135. v-btn(icon, color='grey', x-small, v-on='on', disabled)
  136. v-icon mdi-power
  137. span Toggle 2FA
  138. template(v-if='user.providerId')
  139. v-divider
  140. v-list-item
  141. v-list-item-avatar(size='32')
  142. v-icon mdi-account
  143. v-list-item-content
  144. v-list-item-title Provider Id
  145. v-list-item-subtitle {{ user.providerId }}
  146. v-card.mt-3.animated.fadeInUp.wait-p4s
  147. v-toolbar(color='primary', dense, dark, flat)
  148. v-icon.mr-2 mdi-account-group
  149. span User Groups
  150. v-list(dense)
  151. template(v-for='(group, idx) in user.groups')
  152. v-list-item
  153. v-list-item-avatar(size='32')
  154. v-icon mdi-account-group-outline
  155. v-list-item-content
  156. v-list-item-title {{group.name}}
  157. v-list-item-action(v-if='!user.isSystem')
  158. v-btn(icon, color='red', x-small)
  159. v-icon mdi-close
  160. v-divider(v-if='idx < user.groups.length - 1')
  161. v-alert.mx-3(v-if='user.groups.length < 1', outlined, color='grey darken-1', icon='mdi-alert')
  162. .caption This user is not assigned to any group yet. You must assign at least 1 group to a user.
  163. v-card-chin(v-if='!user.isSystem')
  164. v-spacer
  165. v-btn(color='primary', text)
  166. v-icon(left) mdi-clipboard-account
  167. span Assign to group
  168. v-flex(xs6)
  169. v-card.animated.fadeInUp.wait-p2s
  170. v-toolbar(color='primary', dense, dark, flat)
  171. v-icon.mr-2 mdi-account-badge-outline
  172. span Extended Metadata
  173. v-list.py-0(two-line, dense)
  174. v-list-item
  175. v-list-item-avatar(size='32')
  176. v-icon mdi-map-marker
  177. v-list-item-content
  178. v-list-item-title Location
  179. v-list-item-subtitle {{ user.location }}
  180. v-list-item-action
  181. v-menu(
  182. v-model='editPop.location'
  183. :close-on-content-click='false'
  184. min-width='350'
  185. left
  186. )
  187. template(v-slot:activator='{ on }')
  188. v-btn(icon, color='grey', x-small, v-on='on', @click='focusField(`iptLocation`)')
  189. v-icon mdi-pencil
  190. v-card
  191. v-text-field(
  192. ref='iptLocation'
  193. v-model='user.location'
  194. label='Location'
  195. solo
  196. hide-details
  197. append-icon='mdi-check'
  198. @click:append='editPop.location = false'
  199. @keydown.enter='editPop.location = false'
  200. @keydown.esc='editPop.location = false'
  201. )
  202. v-divider
  203. v-list-item
  204. v-list-item-avatar(size='32')
  205. v-icon mdi-account-badge-horizontal-outline
  206. v-list-item-content
  207. v-list-item-title Job Title
  208. v-list-item-subtitle {{ user.jobTitle }}
  209. v-list-item-action
  210. v-menu(
  211. v-model='editPop.jobTitle'
  212. :close-on-content-click='false'
  213. min-width='350'
  214. left
  215. )
  216. template(v-slot:activator='{ on }')
  217. v-btn(icon, color='grey', x-small, v-on='on', @click='focusField(`iptJobTitle`)')
  218. v-icon mdi-pencil
  219. v-card
  220. v-text-field(
  221. ref='iptJobTitle'
  222. v-model='user.jobTitle'
  223. label='Job Title'
  224. solo
  225. hide-details
  226. append-icon='mdi-check'
  227. @click:append='editPop.jobTitle = false'
  228. @keydown.enter='editPop.jobTitle = false'
  229. @keydown.esc='editPop.jobTitle = false'
  230. )
  231. v-divider
  232. v-list-item
  233. v-list-item-avatar(size='32')
  234. v-icon mdi-map-clock-outline
  235. v-list-item-content
  236. v-list-item-title Timezone
  237. v-list-item-subtitle {{ user.timezone }}
  238. v-list-item-action
  239. v-menu(
  240. v-model='editPop.timezone'
  241. :close-on-content-click='false'
  242. min-width='350'
  243. left
  244. )
  245. template(v-slot:activator='{ on }')
  246. v-btn(icon, color='grey', x-small, v-on='on', @click='focusField(`iptTimezone`)')
  247. v-icon mdi-pencil
  248. v-card
  249. v-select(
  250. ref='iptTimezone'
  251. :items='timezones'
  252. v-model='user.timezone'
  253. label='Timezone'
  254. solo
  255. dense
  256. hide-details
  257. append-icon='mdi-check'
  258. @click:append='editPop.timezone = false'
  259. @keydown.enter='editPop.timezone = false'
  260. @keydown.esc='editPop.timezone = false'
  261. )
  262. v-card.mt-3.animated.fadeInUp.wait-p4s
  263. v-toolbar(color='primary', dense, dark, flat)
  264. v-icon.mr-2 mdi-file-document-box-multiple-outline
  265. span Content
  266. v-card-text
  267. em.caption.grey--text Coming soon
  268. </template>
  269. <script>
  270. import _ from 'lodash'
  271. import { get } from 'vuex-pathify'
  272. import userQuery from 'gql/admin/users/users-query-single.gql'
  273. export default {
  274. data() {
  275. return {
  276. deleteUserDialog: false,
  277. editPop: {
  278. email: false,
  279. name: false,
  280. pwd: false,
  281. location: false,
  282. jobTitle: false,
  283. timezone: false
  284. },
  285. user: {
  286. name: '',
  287. groups: []
  288. },
  289. timezones: [
  290. { text: '(GMT-11:00) Niue', value: 'Pacific/Niue' },
  291. { text: '(GMT-11:00) Pago Pago', value: 'Pacific/Pago_Pago' },
  292. { text: '(GMT-10:00) Hawaii Time', value: 'Pacific/Honolulu' },
  293. { text: '(GMT-10:00) Rarotonga', value: 'Pacific/Rarotonga' },
  294. { text: '(GMT-10:00) Tahiti', value: 'Pacific/Tahiti' },
  295. { text: '(GMT-09:30) Marquesas', value: 'Pacific/Marquesas' },
  296. { text: '(GMT-09:00) Alaska Time', value: 'America/Anchorage' },
  297. { text: '(GMT-09:00) Gambier', value: 'Pacific/Gambier' },
  298. { text: '(GMT-08:00) Pacific Time', value: 'America/Los_Angeles' },
  299. { text: '(GMT-08:00) Pacific Time - Tijuana', value: 'America/Tijuana' },
  300. { text: '(GMT-08:00) Pacific Time - Vancouver', value: 'America/Vancouver' },
  301. { text: '(GMT-08:00) Pacific Time - Whitehorse', value: 'America/Whitehorse' },
  302. { text: '(GMT-08:00) Pitcairn', value: 'Pacific/Pitcairn' },
  303. { text: '(GMT-07:00) Mountain Time', value: 'America/Denver' },
  304. { text: '(GMT-07:00) Mountain Time - Arizona', value: 'America/Phoenix' },
  305. { text: '(GMT-07:00) Mountain Time - Chihuahua, Mazatlan', value: 'America/Mazatlan' },
  306. { text: '(GMT-07:00) Mountain Time - Dawson Creek', value: 'America/Dawson_Creek' },
  307. { text: '(GMT-07:00) Mountain Time - Edmonton', value: 'America/Edmonton' },
  308. { text: '(GMT-07:00) Mountain Time - Hermosillo', value: 'America/Hermosillo' },
  309. { text: '(GMT-07:00) Mountain Time - Yellowknife', value: 'America/Yellowknife' },
  310. { text: '(GMT-06:00) Belize', value: 'America/Belize' },
  311. { text: '(GMT-06:00) Central Time', value: 'America/Chicago' },
  312. { text: '(GMT-06:00) Central Time - Mexico City', value: 'America/Mexico_City' },
  313. { text: '(GMT-06:00) Central Time - Regina', value: 'America/Regina' },
  314. { text: '(GMT-06:00) Central Time - Tegucigalpa', value: 'America/Tegucigalpa' },
  315. { text: '(GMT-06:00) Central Time - Winnipeg', value: 'America/Winnipeg' },
  316. { text: '(GMT-06:00) Costa Rica', value: 'America/Costa_Rica' },
  317. { text: '(GMT-06:00) El Salvador', value: 'America/El_Salvador' },
  318. { text: '(GMT-06:00) Galapagos', value: 'Pacific/Galapagos' },
  319. { text: '(GMT-06:00) Guatemala', value: 'America/Guatemala' },
  320. { text: '(GMT-06:00) Managua', value: 'America/Managua' },
  321. { text: '(GMT-05:00) America Cancun', value: 'America/Cancun' },
  322. { text: '(GMT-05:00) Bogota', value: 'America/Bogota' },
  323. { text: '(GMT-05:00) Easter Island', value: 'Pacific/Easter' },
  324. { text: '(GMT-05:00) Eastern Time', value: 'America/New_York' },
  325. { text: '(GMT-05:00) Eastern Time - Iqaluit', value: 'America/Iqaluit' },
  326. { text: '(GMT-05:00) Eastern Time - Toronto', value: 'America/Toronto' },
  327. { text: '(GMT-05:00) Guayaquil', value: 'America/Guayaquil' },
  328. { text: '(GMT-05:00) Havana', value: 'America/Havana' },
  329. { text: '(GMT-05:00) Jamaica', value: 'America/Jamaica' },
  330. { text: '(GMT-05:00) Lima', value: 'America/Lima' },
  331. { text: '(GMT-05:00) Nassau', value: 'America/Nassau' },
  332. { text: '(GMT-05:00) Panama', value: 'America/Panama' },
  333. { text: '(GMT-05:00) Port-au-Prince', value: 'America/Port-au-Prince' },
  334. { text: '(GMT-05:00) Rio Branco', value: 'America/Rio_Branco' },
  335. { text: '(GMT-04:00) Atlantic Time - Halifax', value: 'America/Halifax' },
  336. { text: '(GMT-04:00) Barbados', value: 'America/Barbados' },
  337. { text: '(GMT-04:00) Bermuda', value: 'Atlantic/Bermuda' },
  338. { text: '(GMT-04:00) Boa Vista', value: 'America/Boa_Vista' },
  339. { text: '(GMT-04:00) Caracas', value: 'America/Caracas' },
  340. { text: '(GMT-04:00) Curacao', value: 'America/Curacao' },
  341. { text: '(GMT-04:00) Grand Turk', value: 'America/Grand_Turk' },
  342. { text: '(GMT-04:00) Guyana', value: 'America/Guyana' },
  343. { text: '(GMT-04:00) La Paz', value: 'America/La_Paz' },
  344. { text: '(GMT-04:00) Manaus', value: 'America/Manaus' },
  345. { text: '(GMT-04:00) Martinique', value: 'America/Martinique' },
  346. { text: '(GMT-04:00) Port of Spain', value: 'America/Port_of_Spain' },
  347. { text: '(GMT-04:00) Porto Velho', value: 'America/Porto_Velho' },
  348. { text: '(GMT-04:00) Puerto Rico', value: 'America/Puerto_Rico' },
  349. { text: '(GMT-04:00) Santo Domingo', value: 'America/Santo_Domingo' },
  350. { text: '(GMT-04:00) Thule', value: 'America/Thule' },
  351. { text: '(GMT-03:30) Newfoundland Time - St. Johns', value: 'America/St_Johns' },
  352. { text: '(GMT-03:00) Araguaina', value: 'America/Araguaina' },
  353. { text: '(GMT-03:00) Asuncion', value: 'America/Asuncion' },
  354. { text: '(GMT-03:00) Belem', value: 'America/Belem' },
  355. { text: '(GMT-03:00) Buenos Aires', value: 'America/Argentina/Buenos_Aires' },
  356. { text: '(GMT-03:00) Campo Grande', value: 'America/Campo_Grande' },
  357. { text: '(GMT-03:00) Cayenne', value: 'America/Cayenne' },
  358. { text: '(GMT-03:00) Cuiaba', value: 'America/Cuiaba' },
  359. { text: '(GMT-03:00) Fortaleza', value: 'America/Fortaleza' },
  360. { text: '(GMT-03:00) Godthab', value: 'America/Godthab' },
  361. { text: '(GMT-03:00) Maceio', value: 'America/Maceio' },
  362. { text: '(GMT-03:00) Miquelon', value: 'America/Miquelon' },
  363. { text: '(GMT-03:00) Montevideo', value: 'America/Montevideo' },
  364. { text: '(GMT-03:00) Palmer', value: 'Antarctica/Palmer' },
  365. { text: '(GMT-03:00) Paramaribo', value: 'America/Paramaribo' },
  366. { text: '(GMT-03:00) Punta Arenas', value: 'America/Punta_Arenas' },
  367. { text: '(GMT-03:00) Recife', value: 'America/Recife' },
  368. { text: '(GMT-03:00) Rothera', value: 'Antarctica/Rothera' },
  369. { text: '(GMT-03:00) Salvador', value: 'America/Bahia' },
  370. { text: '(GMT-03:00) Santiago', value: 'America/Santiago' },
  371. { text: '(GMT-03:00) Stanley', value: 'Atlantic/Stanley' },
  372. { text: '(GMT-02:00) Noronha', value: 'America/Noronha' },
  373. { text: '(GMT-02:00) Sao Paulo', value: 'America/Sao_Paulo' },
  374. { text: '(GMT-02:00) South Georgia', value: 'Atlantic/South_Georgia' },
  375. { text: '(GMT-01:00) Azores', value: 'Atlantic/Azores' },
  376. { text: '(GMT-01:00) Cape Verde', value: 'Atlantic/Cape_Verde' },
  377. { text: '(GMT-01:00) Scoresbysund', value: 'America/Scoresbysund' },
  378. { text: '(GMT+00:00) Abidjan', value: 'Africa/Abidjan' },
  379. { text: '(GMT+00:00) Accra', value: 'Africa/Accra' },
  380. { text: '(GMT+00:00) Bissau', value: 'Africa/Bissau' },
  381. { text: '(GMT+00:00) Canary Islands', value: 'Atlantic/Canary' },
  382. { text: '(GMT+00:00) Casablanca', value: 'Africa/Casablanca' },
  383. { text: '(GMT+00:00) Danmarkshavn', value: 'America/Danmarkshavn' },
  384. { text: '(GMT+00:00) Dublin', value: 'Europe/Dublin' },
  385. { text: '(GMT+00:00) El Aaiun', value: 'Africa/El_Aaiun' },
  386. { text: '(GMT+00:00) Faeroe', value: 'Atlantic/Faroe' },
  387. { text: '(GMT+00:00) GMT (no daylight saving)', value: 'Etc/GMT' },
  388. { text: '(GMT+00:00) Lisbon', value: 'Europe/Lisbon' },
  389. { text: '(GMT+00:00) London', value: 'Europe/London' },
  390. { text: '(GMT+00:00) Monrovia', value: 'Africa/Monrovia' },
  391. { text: '(GMT+00:00) Reykjavik', value: 'Atlantic/Reykjavik' },
  392. { text: '(GMT+01:00) Algiers', value: 'Africa/Algiers' },
  393. { text: '(GMT+01:00) Amsterdam', value: 'Europe/Amsterdam' },
  394. { text: '(GMT+01:00) Andorra', value: 'Europe/Andorra' },
  395. { text: '(GMT+01:00) Berlin', value: 'Europe/Berlin' },
  396. { text: '(GMT+01:00) Brussels', value: 'Europe/Brussels' },
  397. { text: '(GMT+01:00) Budapest', value: 'Europe/Budapest' },
  398. { text: '(GMT+01:00) Central European Time - Belgrade', value: 'Europe/Belgrade' },
  399. { text: '(GMT+01:00) Central European Time - Prague', value: 'Europe/Prague' },
  400. { text: '(GMT+01:00) Ceuta', value: 'Africa/Ceuta' },
  401. { text: '(GMT+01:00) Copenhagen', value: 'Europe/Copenhagen' },
  402. { text: '(GMT+01:00) Gibraltar', value: 'Europe/Gibraltar' },
  403. { text: '(GMT+01:00) Lagos', value: 'Africa/Lagos' },
  404. { text: '(GMT+01:00) Luxembourg', value: 'Europe/Luxembourg' },
  405. { text: '(GMT+01:00) Madrid', value: 'Europe/Madrid' },
  406. { text: '(GMT+01:00) Malta', value: 'Europe/Malta' },
  407. { text: '(GMT+01:00) Monaco', value: 'Europe/Monaco' },
  408. { text: '(GMT+01:00) Ndjamena', value: 'Africa/Ndjamena' },
  409. { text: '(GMT+01:00) Oslo', value: 'Europe/Oslo' },
  410. { text: '(GMT+01:00) Paris', value: 'Europe/Paris' },
  411. { text: '(GMT+01:00) Rome', value: 'Europe/Rome' },
  412. { text: '(GMT+01:00) Stockholm', value: 'Europe/Stockholm' },
  413. { text: '(GMT+01:00) Tirane', value: 'Europe/Tirane' },
  414. { text: '(GMT+01:00) Tunis', value: 'Africa/Tunis' },
  415. { text: '(GMT+01:00) Vienna', value: 'Europe/Vienna' },
  416. { text: '(GMT+01:00) Warsaw', value: 'Europe/Warsaw' },
  417. { text: '(GMT+01:00) Zurich', value: 'Europe/Zurich' },
  418. { text: '(GMT+02:00) Amman', value: 'Asia/Amman' },
  419. { text: '(GMT+02:00) Athens', value: 'Europe/Athens' },
  420. { text: '(GMT+02:00) Beirut', value: 'Asia/Beirut' },
  421. { text: '(GMT+02:00) Bucharest', value: 'Europe/Bucharest' },
  422. { text: '(GMT+02:00) Cairo', value: 'Africa/Cairo' },
  423. { text: '(GMT+02:00) Chisinau', value: 'Europe/Chisinau' },
  424. { text: '(GMT+02:00) Damascus', value: 'Asia/Damascus' },
  425. { text: '(GMT+02:00) Gaza', value: 'Asia/Gaza' },
  426. { text: '(GMT+02:00) Helsinki', value: 'Europe/Helsinki' },
  427. { text: '(GMT+02:00) Jerusalem', value: 'Asia/Jerusalem' },
  428. { text: '(GMT+02:00) Johannesburg', value: 'Africa/Johannesburg' },
  429. { text: '(GMT+02:00) Khartoum', value: 'Africa/Khartoum' },
  430. { text: '(GMT+02:00) Kiev', value: 'Europe/Kiev' },
  431. { text: '(GMT+02:00) Maputo', value: 'Africa/Maputo' },
  432. { text: '(GMT+02:00) Moscow-01 - Kaliningrad', value: 'Europe/Kaliningrad' },
  433. { text: '(GMT+02:00) Nicosia', value: 'Asia/Nicosia' },
  434. { text: '(GMT+02:00) Riga', value: 'Europe/Riga' },
  435. { text: '(GMT+02:00) Sofia', value: 'Europe/Sofia' },
  436. { text: '(GMT+02:00) Tallinn', value: 'Europe/Tallinn' },
  437. { text: '(GMT+02:00) Tripoli', value: 'Africa/Tripoli' },
  438. { text: '(GMT+02:00) Vilnius', value: 'Europe/Vilnius' },
  439. { text: '(GMT+02:00) Windhoek', value: 'Africa/Windhoek' },
  440. { text: '(GMT+03:00) Baghdad', value: 'Asia/Baghdad' },
  441. { text: '(GMT+03:00) Istanbul', value: 'Europe/Istanbul' },
  442. { text: '(GMT+03:00) Minsk', value: 'Europe/Minsk' },
  443. { text: '(GMT+03:00) Moscow+00 - Moscow', value: 'Europe/Moscow' },
  444. { text: '(GMT+03:00) Nairobi', value: 'Africa/Nairobi' },
  445. { text: '(GMT+03:00) Qatar', value: 'Asia/Qatar' },
  446. { text: '(GMT+03:00) Riyadh', value: 'Asia/Riyadh' },
  447. { text: '(GMT+03:00) Syowa', value: 'Antarctica/Syowa' },
  448. { text: '(GMT+03:30) Tehran', value: 'Asia/Tehran' },
  449. { text: '(GMT+04:00) Baku', value: 'Asia/Baku' },
  450. { text: '(GMT+04:00) Dubai', value: 'Asia/Dubai' },
  451. { text: '(GMT+04:00) Mahe', value: 'Indian/Mahe' },
  452. { text: '(GMT+04:00) Mauritius', value: 'Indian/Mauritius' },
  453. { text: '(GMT+04:00) Moscow+01 - Samara', value: 'Europe/Samara' },
  454. { text: '(GMT+04:00) Reunion', value: 'Indian/Reunion' },
  455. { text: '(GMT+04:00) Tbilisi', value: 'Asia/Tbilisi' },
  456. { text: '(GMT+04:00) Yerevan', value: 'Asia/Yerevan' },
  457. { text: '(GMT+04:30) Kabul', value: 'Asia/Kabul' },
  458. { text: '(GMT+05:00) Aqtau', value: 'Asia/Aqtau' },
  459. { text: '(GMT+05:00) Aqtobe', value: 'Asia/Aqtobe' },
  460. { text: '(GMT+05:00) Ashgabat', value: 'Asia/Ashgabat' },
  461. { text: '(GMT+05:00) Dushanbe', value: 'Asia/Dushanbe' },
  462. { text: '(GMT+05:00) Karachi', value: 'Asia/Karachi' },
  463. { text: '(GMT+05:00) Kerguelen', value: 'Indian/Kerguelen' },
  464. { text: '(GMT+05:00) Maldives', value: 'Indian/Maldives' },
  465. { text: '(GMT+05:00) Mawson', value: 'Antarctica/Mawson' },
  466. { text: '(GMT+05:00) Moscow+02 - Yekaterinburg', value: 'Asia/Yekaterinburg' },
  467. { text: '(GMT+05:00) Tashkent', value: 'Asia/Tashkent' },
  468. { text: '(GMT+05:30) Colombo', value: 'Asia/Colombo' },
  469. { text: '(GMT+05:30) India Standard Time', value: 'Asia/Kolkata' },
  470. { text: '(GMT+05:45) Kathmandu', value: 'Asia/Kathmandu' },
  471. { text: '(GMT+06:00) Almaty', value: 'Asia/Almaty' },
  472. { text: '(GMT+06:00) Bishkek', value: 'Asia/Bishkek' },
  473. { text: '(GMT+06:00) Chagos', value: 'Indian/Chagos' },
  474. { text: '(GMT+06:00) Dhaka', value: 'Asia/Dhaka' },
  475. { text: '(GMT+06:00) Moscow+03 - Omsk', value: 'Asia/Omsk' },
  476. { text: '(GMT+06:00) Thimphu', value: 'Asia/Thimphu' },
  477. { text: '(GMT+06:00) Vostok', value: 'Antarctica/Vostok' },
  478. { text: '(GMT+06:30) Cocos', value: 'Indian/Cocos' },
  479. { text: '(GMT+06:30) Rangoon', value: 'Asia/Yangon' },
  480. { text: '(GMT+07:00) Bangkok', value: 'Asia/Bangkok' },
  481. { text: '(GMT+07:00) Christmas', value: 'Indian/Christmas' },
  482. { text: '(GMT+07:00) Davis', value: 'Antarctica/Davis' },
  483. { text: '(GMT+07:00) Hanoi', value: 'Asia/Saigon' },
  484. { text: '(GMT+07:00) Hovd', value: 'Asia/Hovd' },
  485. { text: '(GMT+07:00) Jakarta', value: 'Asia/Jakarta' },
  486. { text: '(GMT+07:00) Moscow+04 - Krasnoyarsk', value: 'Asia/Krasnoyarsk' },
  487. { text: '(GMT+08:00) Brunei', value: 'Asia/Brunei' },
  488. { text: '(GMT+08:00) China Time - Beijing', value: 'Asia/Shanghai' },
  489. { text: '(GMT+08:00) Choibalsan', value: 'Asia/Choibalsan' },
  490. { text: '(GMT+08:00) Hong Kong', value: 'Asia/Hong_Kong' },
  491. { text: '(GMT+08:00) Kuala Lumpur', value: 'Asia/Kuala_Lumpur' },
  492. { text: '(GMT+08:00) Macau', value: 'Asia/Macau' },
  493. { text: '(GMT+08:00) Makassar', value: 'Asia/Makassar' },
  494. { text: '(GMT+08:00) Manila', value: 'Asia/Manila' },
  495. { text: '(GMT+08:00) Moscow+05 - Irkutsk', value: 'Asia/Irkutsk' },
  496. { text: '(GMT+08:00) Singapore', value: 'Asia/Singapore' },
  497. { text: '(GMT+08:00) Taipei', value: 'Asia/Taipei' },
  498. { text: '(GMT+08:00) Ulaanbaatar', value: 'Asia/Ulaanbaatar' },
  499. { text: '(GMT+08:00) Western Time - Perth', value: 'Australia/Perth' },
  500. { text: '(GMT+08:30) Pyongyang', value: 'Asia/Pyongyang' },
  501. { text: '(GMT+09:00) Dili', value: 'Asia/Dili' },
  502. { text: '(GMT+09:00) Jayapura', value: 'Asia/Jayapura' },
  503. { text: '(GMT+09:00) Moscow+06 - Yakutsk', value: 'Asia/Yakutsk' },
  504. { text: '(GMT+09:00) Palau', value: 'Pacific/Palau' },
  505. { text: '(GMT+09:00) Seoul', value: 'Asia/Seoul' },
  506. { text: '(GMT+09:00) Tokyo', value: 'Asia/Tokyo' },
  507. { text: '(GMT+09:30) Central Time - Darwin', value: 'Australia/Darwin' },
  508. { text: '(GMT+10:00) Dumont D\'Urville', value: 'Antarctica/DumontDUrville' },
  509. { text: '(GMT+10:00) Eastern Time - Brisbane', value: 'Australia/Brisbane' },
  510. { text: '(GMT+10:00) Guam', value: 'Pacific/Guam' },
  511. { text: '(GMT+10:00) Moscow+07 - Vladivostok', value: 'Asia/Vladivostok' },
  512. { text: '(GMT+10:00) Port Moresby', value: 'Pacific/Port_Moresby' },
  513. { text: '(GMT+10:00) Truk', value: 'Pacific/Chuuk' },
  514. { text: '(GMT+10:30) Central Time - Adelaide', value: 'Australia/Adelaide' },
  515. { text: '(GMT+11:00) Casey', value: 'Antarctica/Casey' },
  516. { text: '(GMT+11:00) Eastern Time - Hobart', value: 'Australia/Hobart' },
  517. { text: '(GMT+11:00) Eastern Time - Melbourne, Sydney', value: 'Australia/Sydney' },
  518. { text: '(GMT+11:00) Efate', value: 'Pacific/Efate' },
  519. { text: '(GMT+11:00) Guadalcanal', value: 'Pacific/Guadalcanal' },
  520. { text: '(GMT+11:00) Kosrae', value: 'Pacific/Kosrae' },
  521. { text: '(GMT+11:00) Moscow+08 - Magadan', value: 'Asia/Magadan' },
  522. { text: '(GMT+11:00) Norfolk', value: 'Pacific/Norfolk' },
  523. { text: '(GMT+11:00) Noumea', value: 'Pacific/Noumea' },
  524. { text: '(GMT+11:00) Ponape', value: 'Pacific/Pohnpei' },
  525. { text: '(GMT+12:00) Funafuti', value: 'Pacific/Funafuti' },
  526. { text: '(GMT+12:00) Kwajalein', value: 'Pacific/Kwajalein' },
  527. { text: '(GMT+12:00) Majuro', value: 'Pacific/Majuro' },
  528. { text: '(GMT+12:00) Moscow+09 - Petropavlovsk-Kamchatskiy', value: 'Asia/Kamchatka' },
  529. { text: '(GMT+12:00) Nauru', value: 'Pacific/Nauru' },
  530. { text: '(GMT+12:00) Tarawa', value: 'Pacific/Tarawa' },
  531. { text: '(GMT+12:00) Wake', value: 'Pacific/Wake' },
  532. { text: '(GMT+12:00) Wallis', value: 'Pacific/Wallis' },
  533. { text: '(GMT+13:00) Auckland', value: 'Pacific/Auckland' },
  534. { text: '(GMT+13:00) Enderbury', value: 'Pacific/Enderbury' },
  535. { text: '(GMT+13:00) Fakaofo', value: 'Pacific/Fakaofo' },
  536. { text: '(GMT+13:00) Fiji', value: 'Pacific/Fiji' },
  537. { text: '(GMT+13:00) Tongatapu', value: 'Pacific/Tongatapu' },
  538. { text: '(GMT+14:00) Apia', value: 'Pacific/Apia' },
  539. { text: '(GMT+14:00) Kiritimati', value: 'Pacific/Kiritimati' }
  540. ]
  541. }
  542. },
  543. computed: {
  544. currentUserId: get('user/id')
  545. },
  546. methods: {
  547. deleteUser() {},
  548. updateUser() {},
  549. focusField (ipt) {
  550. this.$nextTick(() => {
  551. _.delay(() => {
  552. this.$refs[ipt].focus()
  553. }, 200)
  554. })
  555. }
  556. },
  557. apollo: {
  558. user: {
  559. query: userQuery,
  560. variables() {
  561. return {
  562. id: _.toSafeInteger(this.$route.params.id)
  563. }
  564. },
  565. fetchPolicy: 'network-only',
  566. update: (data) => data.users.single,
  567. watchLoading (isLoading) {
  568. this.$store.commit(`loading${isLoading ? 'Start' : 'Stop'}`, 'admin-users-refresh')
  569. }
  570. }
  571. }
  572. }
  573. </script>
  574. <style lang='scss'>
  575. </style>