ali пре 3 година
родитељ
комит
4499b115d8

+ 1 - 1
package.json

@@ -51,7 +51,7 @@
     "process": "^0.11.10",
     "quasar": "^2.12.0",
     "quasar-app-extension-q-page-builder": "^0.1.51",
-    "quasar-crud": "^0.3.50",
+    "quasar-crud": "^0.3.52",
     "quasar-form-builder": "^0.1.110",
     "quasar-template-builder": "^1.0.23",
     "quasar-ui-q-page-builder": "^0.1.51",

+ 14 - 0
src/api/models/User.js

@@ -97,6 +97,20 @@ export default class UserAPI extends APIRepository {
     })
   }
 
+  getCurrent() {
+    return this.sendRequest({
+      apiMethod: 'get',
+      api: this.api,
+      request: this.APIAdresses.current,
+      resolveCallback: (response) => {
+        return new User(response.data)
+      },
+      rejectCallback: (error) => {
+        return error
+      }
+    })
+  }
+
   updateByAdmin(data = {}) {
     return this.sendRequest({
       apiMethod: 'put',

+ 58 - 42
src/components/other/NationalCode.vue

@@ -1,33 +1,38 @@
 <template>
   <div class="NationalCode">
-    <q-input v-model="inputData"
-             :label="label"
-             :disable="disable"
-             :loading="loading"
-             :class="{'verified': state === 'verified'}"
-             class="NationalCode-input"
-             @update:model-value="change($event)" />
-    <div v-if="state === 'verified'"
-         class="NationalCode-verified-mark">
-      <svg xmlns="http://www.w3.org/2000/svg"
-           width="24"
-           height="23.999"
-           viewBox="0 0 24 23.999">
-        <g id="check_circle-24px_1_"
-           data-name="check_circle-24px (1)"
-           transform="translate(0 0)">
-          <path id="Path_797"
-                data-name="Path 797"
-                d="M0,0H24V24H0Z"
-                transform="translate(0 0)"
-                fill="none" />
-          <path id="Path_798"
-                data-name="Path 798"
-                d="M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM9.29,16.289,5.7,12.7a1,1,0,0,1,1.41-1.41L10,14.169l6.88-6.879a1,1,0,0,1,1.41,1.41L10.7,16.289a1,1,0,0,1-1.41,0Z"
-                transform="translate(0.001 0)"
-                fill="#10d078" />
-        </g>
-      </svg>
+    <div class="label">
+      {{ label }}
+    </div>
+    <div class="contents">
+      <q-input v-model="inputData"
+               :placeholder="placeholder"
+               :disable="disable"
+               :loading="loading"
+               :class="{'verified': state === 'verified'}"
+               class="NationalCode-input"
+               @update:model-value="change($event)" />
+      <div v-if="state === 'verified'"
+           class="NationalCode-verified-mark">
+        <svg xmlns="http://www.w3.org/2000/svg"
+             width="24"
+             height="23.999"
+             viewBox="0 0 24 23.999">
+          <g id="check_circle-24px_1_"
+             data-name="check_circle-24px (1)"
+             transform="translate(0 0)">
+            <path id="Path_797"
+                  data-name="Path 797"
+                  d="M0,0H24V24H0Z"
+                  transform="translate(0 0)"
+                  fill="none" />
+            <path id="Path_798"
+                  data-name="Path 798"
+                  d="M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM9.29,16.289,5.7,12.7a1,1,0,0,1,1.41-1.41L10,14.169l6.88-6.879a1,1,0,0,1,1.41,1.41L10.7,16.289a1,1,0,0,1-1.41,0Z"
+                  transform="translate(0.001 0)"
+                  fill="#10d078" />
+          </g>
+        </svg>
+      </div>
     </div>
   </div>
 </template>
@@ -48,6 +53,14 @@ export default {
       default: 'primary',
       type: String
     },
+    label: {
+      default: 'کدملی/کد اتباع غیر ایرانی',
+      type: String
+    },
+    placeholder: {
+      default: '',
+      type: String
+    },
     atClick: {
       type: Function,
       default: () => {}
@@ -59,7 +72,6 @@ export default {
       state: 'input-national-code',
       textInput: null,
       updatedFromWatch: false,
-      label: 'کدملی/کد اتباع غیر ایرانی',
       loading: false,
       NationalCode: null,
       inputData: null,
@@ -115,21 +127,25 @@ export default {
 
 <style lang="scss" scoped>
 .NationalCode {
-  display: flex;
-  flex-flow: row;
-  justify-content: center;
-  align-items: center;
-  position: relative;
-  .NationalCode-input {
-    width: 100%;
-  }
-  .NationalCode-verified-mark {
-    position: absolute;
-    right: 15px;
-    bottom: 12px;
+  .contents {
     display: flex;
-    align-items: center;
+    flex-flow: row;
     justify-content: center;
+    align-items: center;
+    position: relative;
+
+    .NationalCode-input {
+      width: 100%;
+    }
+
+    .NationalCode-verified-mark {
+      position: absolute;
+      right: 15px;
+      bottom: 12px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
   }
 }
 </style>

+ 108 - 94
src/components/other/VerifyEmail.vue

@@ -1,66 +1,71 @@
 <template>
   <div class="VerifyEmail">
-    <q-input v-model="textInput"
-             :label="label"
-             :disable="disable"
-             :loading="loading"
-             :class="{'verified': state === 'verified'}"
-             class="VerifyEmail-input" />
-    <q-btn v-if="state === 'input-email-address'"
-           label="دریافت کد"
-           outline
-           color="primary"
-           class="VerifyEmail-btn"
-           :loading="loading"
-           @click="sendOtp" />
-    <q-btn v-if="state === 'send-verify-number'"
-           label="تایید"
-           color="primary"
-           class="VerifyEmail-btn"
-           :loading="loading"
-           @click="verify" />
-    <div class="VerifyEmail-message">
-      {{message}}
-      <svg v-if="state === 'send-verify-number'"
-           xmlns="http://www.w3.org/2000/svg"
-           width="19.5"
-           height="18.94"
-           viewBox="0 0 19.5 18.94"
-           @click="updateEmailAddress">
-        <g id="Edit"
-           transform="translate(0)">
-          <path id="Combined_Shape"
-                data-name="Combined Shape"
-                d="M11.5,18.94a.75.75,0,0,1,0-1.5h7.253a.75.75,0,0,1,0,1.5Zm-9.884,0a.749.749,0,0,1-.731-.577L.064,14.891a2.373,2.373,0,0,1,.461-2.037L9.944,1.073l.007-.009,0,0A3.006,3.006,0,0,1,14.116.653l1.7,1.326.018.014A2.8,2.8,0,0,1,17.1,3.767a2.87,2.87,0,0,1-.368,2.2c-.018.028-.036.055-1.865,2.347a.747.747,0,0,1-.131.164c-1.366,1.712-3.677,4.6-7.59,9.5a2.445,2.445,0,0,1-1.886.914l-3.639.046ZM1.7,13.792a.877.877,0,0,0-.171.755l.68,2.884,3.039-.038a.944.944,0,0,0,.733-.352c1.933-2.418,5.04-6.306,7.178-8.982L8.9,4.788Zm12.4-6.9c.82-1.027,1.36-1.7,1.41-1.769a1.351,1.351,0,0,0,.141-1,1.406,1.406,0,0,0-.652-.887c-.059-.04-1.265-.976-1.779-1.375l-.029-.022a1.512,1.512,0,0,0-.942-.331,1.473,1.473,0,0,0-1.13.519l-1.279,1.6Z"
-                fill="#475f4a" />
-        </g>
-      </svg>
-    </div>
-    <div v-if="state === 'send-verify-number'"
-         class="VerifyEmail-timer">
-      {{formatedTimer}}
+    <div class="label">
+      {{ label }}
     </div>
-    <div v-if="state === 'verified'"
-         class="VerifyEmail-verified-mark">
-      <svg xmlns="http://www.w3.org/2000/svg"
-           width="24"
-           height="23.999"
-           viewBox="0 0 24 23.999">
-        <g id="check_circle-24px_1_"
-           data-name="check_circle-24px (1)"
-           transform="translate(0 0)">
-          <path id="Path_797"
-                data-name="Path 797"
-                d="M0,0H24V24H0Z"
-                transform="translate(0 0)"
-                fill="none" />
-          <path id="Path_798"
-                data-name="Path 798"
-                d="M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM9.29,16.289,5.7,12.7a1,1,0,0,1,1.41-1.41L10,14.169l6.88-6.879a1,1,0,0,1,1.41,1.41L10.7,16.289a1,1,0,0,1-1.41,0Z"
-                transform="translate(0.001 0)"
-                fill="#10d078" />
-        </g>
-      </svg>
+    <div class="contents">
+      <q-input v-model="textInput"
+               :label="label"
+               :disable="disable"
+               :loading="loading"
+               :class="{'verified': state === 'verified'}"
+               class="VerifyEmail-input" />
+      <q-btn v-if="state === 'input-email-address'"
+             label="دریافت کد"
+             outline
+             color="primary"
+             class="VerifyEmail-btn"
+             :loading="loading"
+             @click="sendOtp" />
+      <q-btn v-if="state === 'send-verify-number'"
+             label="تایید"
+             color="primary"
+             class="VerifyEmail-btn"
+             :loading="loading"
+             @click="verify" />
+      <div class="VerifyEmail-message">
+        {{message}}
+        <svg v-if="state === 'send-verify-number'"
+             xmlns="http://www.w3.org/2000/svg"
+             width="19.5"
+             height="18.94"
+             viewBox="0 0 19.5 18.94"
+             @click="updateEmailAddress">
+          <g id="Edit"
+             transform="translate(0)">
+            <path id="Combined_Shape"
+                  data-name="Combined Shape"
+                  d="M11.5,18.94a.75.75,0,0,1,0-1.5h7.253a.75.75,0,0,1,0,1.5Zm-9.884,0a.749.749,0,0,1-.731-.577L.064,14.891a2.373,2.373,0,0,1,.461-2.037L9.944,1.073l.007-.009,0,0A3.006,3.006,0,0,1,14.116.653l1.7,1.326.018.014A2.8,2.8,0,0,1,17.1,3.767a2.87,2.87,0,0,1-.368,2.2c-.018.028-.036.055-1.865,2.347a.747.747,0,0,1-.131.164c-1.366,1.712-3.677,4.6-7.59,9.5a2.445,2.445,0,0,1-1.886.914l-3.639.046ZM1.7,13.792a.877.877,0,0,0-.171.755l.68,2.884,3.039-.038a.944.944,0,0,0,.733-.352c1.933-2.418,5.04-6.306,7.178-8.982L8.9,4.788Zm12.4-6.9c.82-1.027,1.36-1.7,1.41-1.769a1.351,1.351,0,0,0,.141-1,1.406,1.406,0,0,0-.652-.887c-.059-.04-1.265-.976-1.779-1.375l-.029-.022a1.512,1.512,0,0,0-.942-.331,1.473,1.473,0,0,0-1.13.519l-1.279,1.6Z"
+                  fill="#475f4a" />
+          </g>
+        </svg>
+      </div>
+      <div v-if="state === 'send-verify-number'"
+           class="VerifyEmail-timer">
+        {{formatedTimer}}
+      </div>
+      <div v-if="state === 'verified'"
+           class="VerifyEmail-verified-mark">
+        <svg xmlns="http://www.w3.org/2000/svg"
+             width="24"
+             height="23.999"
+             viewBox="0 0 24 23.999">
+          <g id="check_circle-24px_1_"
+             data-name="check_circle-24px (1)"
+             transform="translate(0 0)">
+            <path id="Path_797"
+                  data-name="Path 797"
+                  d="M0,0H24V24H0Z"
+                  transform="translate(0 0)"
+                  fill="none" />
+            <path id="Path_798"
+                  data-name="Path 798"
+                  d="M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM9.29,16.289,5.7,12.7a1,1,0,0,1,1.41-1.41L10,14.169l6.88-6.879a1,1,0,0,1,1.41,1.41L10.7,16.289a1,1,0,0,1-1.41,0Z"
+                  transform="translate(0.001 0)"
+                  fill="#10d078" />
+          </g>
+        </svg>
+      </div>
     </div>
   </div>
 </template>
@@ -215,42 +220,51 @@ export default {
 
 <style lang="scss" scoped>
 .VerifyEmail {
-  display: flex;
-  flex-flow: row;
-  justify-content: center;
-  align-items: center;
-  position: relative;
-  .VerifyEmail-input {
-    width: calc( 100% - 130px );
-    &.verified {
-      width: 100%;
-    }
-  }
-  .VerifyEmail-btn {
-    width: 118px;
-    height: 48px;
-    margin-left: 12px;
-  }
-  .VerifyEmail-message {
-    position: absolute;
-    right: 0;
-    bottom: -30px;
-    svg {
-      cursor: pointer;
-    }
-  }
-  .VerifyEmail-timer {
-    position: absolute;
-    right: 135px;
-    bottom: 13px;
-  }
-  .VerifyEmail-verified-mark {
-    position: absolute;
-    right: 15px;
-    bottom: 12px;
+  .contents {
     display: flex;
-    align-items: center;
+    flex-flow: row;
     justify-content: center;
+    align-items: center;
+    position: relative;
+
+    .VerifyEmail-input {
+      width: calc(100% - 130px);
+
+      &.verified {
+        width: 100%;
+      }
+    }
+
+    .VerifyEmail-btn {
+      width: 118px;
+      height: 48px;
+      margin-left: 12px;
+    }
+
+    .VerifyEmail-message {
+      position: absolute;
+      right: 0;
+      bottom: -30px;
+
+      svg {
+        cursor: pointer;
+      }
+    }
+
+    .VerifyEmail-timer {
+      position: absolute;
+      right: 135px;
+      bottom: 13px;
+    }
+
+    .VerifyEmail-verified-mark {
+      position: absolute;
+      right: 15px;
+      bottom: 12px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
   }
 }
 </style>

+ 101 - 94
src/components/other/VerifyMobileNumber.vue

@@ -1,66 +1,71 @@
 <template>
   <div class="VerifyMobileNumber">
-    <q-input v-model="textInput"
-             :label="label"
-             :disable="disable"
-             :loading="loading"
-             :class="{'verified': state === 'verified'}"
-             class="VerifyMobileNumber-input" />
-    <q-btn v-if="state === 'input-mobile-number'"
-           label="دریافت کد"
-           outline
-           color="primary"
-           class="VerifyMobileNumber-btn"
-           :loading="loading"
-           @click="sendOtp" />
-    <q-btn v-if="state === 'send-verify-number'"
-           label="تایید"
-           color="primary"
-           class="VerifyMobileNumber-btn"
-           :loading="loading"
-           @click="verify" />
-    <div class="VerifyMobileNumber-message">
-      {{message}}
-      <svg v-if="state === 'send-verify-number'"
-           xmlns="http://www.w3.org/2000/svg"
-           width="19.5"
-           height="18.94"
-           viewBox="0 0 19.5 18.94"
-           @click="updateMobileNumber">
-        <g id="Edit"
-           transform="translate(0)">
-          <path id="Combined_Shape"
-                data-name="Combined Shape"
-                d="M11.5,18.94a.75.75,0,0,1,0-1.5h7.253a.75.75,0,0,1,0,1.5Zm-9.884,0a.749.749,0,0,1-.731-.577L.064,14.891a2.373,2.373,0,0,1,.461-2.037L9.944,1.073l.007-.009,0,0A3.006,3.006,0,0,1,14.116.653l1.7,1.326.018.014A2.8,2.8,0,0,1,17.1,3.767a2.87,2.87,0,0,1-.368,2.2c-.018.028-.036.055-1.865,2.347a.747.747,0,0,1-.131.164c-1.366,1.712-3.677,4.6-7.59,9.5a2.445,2.445,0,0,1-1.886.914l-3.639.046ZM1.7,13.792a.877.877,0,0,0-.171.755l.68,2.884,3.039-.038a.944.944,0,0,0,.733-.352c1.933-2.418,5.04-6.306,7.178-8.982L8.9,4.788Zm12.4-6.9c.82-1.027,1.36-1.7,1.41-1.769a1.351,1.351,0,0,0,.141-1,1.406,1.406,0,0,0-.652-.887c-.059-.04-1.265-.976-1.779-1.375l-.029-.022a1.512,1.512,0,0,0-.942-.331,1.473,1.473,0,0,0-1.13.519l-1.279,1.6Z"
-                fill="#475f4a" />
-        </g>
-      </svg>
-    </div>
-    <div v-if="state === 'send-verify-number'"
-         class="VerifyMobileNumber-timer">
-      {{formatedTimer}}
+    <div class="label">
+      {{ label }}
     </div>
-    <div v-if="state === 'verified'"
-         class="VerifyMobileNumber-verified-mark">
-      <svg xmlns="http://www.w3.org/2000/svg"
-           width="24"
-           height="23.999"
-           viewBox="0 0 24 23.999">
-        <g id="check_circle-24px_1_"
-           data-name="check_circle-24px (1)"
-           transform="translate(0 0)">
-          <path id="Path_797"
-                data-name="Path 797"
-                d="M0,0H24V24H0Z"
-                transform="translate(0 0)"
-                fill="none" />
-          <path id="Path_798"
-                data-name="Path 798"
-                d="M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM9.29,16.289,5.7,12.7a1,1,0,0,1,1.41-1.41L10,14.169l6.88-6.879a1,1,0,0,1,1.41,1.41L10.7,16.289a1,1,0,0,1-1.41,0Z"
-                transform="translate(0.001 0)"
-                fill="#10d078" />
-        </g>
-      </svg>
+    <div class="contents">
+      <q-input v-model="textInput"
+               :placeholder="placeholder"
+               :disable="disable"
+               :loading="loading"
+               :class="{'verified': state === 'verified'}"
+               class="VerifyMobileNumber-input" />
+      <q-btn v-if="state === 'input-mobile-number'"
+             label="دریافت کد"
+             outline
+             color="primary"
+             class="VerifyMobileNumber-btn"
+             :loading="loading"
+             @click="sendOtp" />
+      <q-btn v-if="state === 'send-verify-number'"
+             label="تایید"
+             color="primary"
+             class="VerifyMobileNumber-btn"
+             :loading="loading"
+             @click="verify" />
+      <div class="VerifyMobileNumber-message">
+        {{message}}
+        <svg v-if="state === 'send-verify-number'"
+             xmlns="http://www.w3.org/2000/svg"
+             width="19.5"
+             height="18.94"
+             viewBox="0 0 19.5 18.94"
+             @click="updateMobileNumber">
+          <g id="Edit"
+             transform="translate(0)">
+            <path id="Combined_Shape"
+                  data-name="Combined Shape"
+                  d="M11.5,18.94a.75.75,0,0,1,0-1.5h7.253a.75.75,0,0,1,0,1.5Zm-9.884,0a.749.749,0,0,1-.731-.577L.064,14.891a2.373,2.373,0,0,1,.461-2.037L9.944,1.073l.007-.009,0,0A3.006,3.006,0,0,1,14.116.653l1.7,1.326.018.014A2.8,2.8,0,0,1,17.1,3.767a2.87,2.87,0,0,1-.368,2.2c-.018.028-.036.055-1.865,2.347a.747.747,0,0,1-.131.164c-1.366,1.712-3.677,4.6-7.59,9.5a2.445,2.445,0,0,1-1.886.914l-3.639.046ZM1.7,13.792a.877.877,0,0,0-.171.755l.68,2.884,3.039-.038a.944.944,0,0,0,.733-.352c1.933-2.418,5.04-6.306,7.178-8.982L8.9,4.788Zm12.4-6.9c.82-1.027,1.36-1.7,1.41-1.769a1.351,1.351,0,0,0,.141-1,1.406,1.406,0,0,0-.652-.887c-.059-.04-1.265-.976-1.779-1.375l-.029-.022a1.512,1.512,0,0,0-.942-.331,1.473,1.473,0,0,0-1.13.519l-1.279,1.6Z"
+                  fill="#475f4a" />
+          </g>
+        </svg>
+      </div>
+      <div v-if="state === 'send-verify-number'"
+           class="VerifyMobileNumber-timer">
+        {{formatedTimer}}
+      </div>
+      <div v-if="state === 'verified'"
+           class="VerifyMobileNumber-verified-mark">
+        <svg xmlns="http://www.w3.org/2000/svg"
+             width="24"
+             height="23.999"
+             viewBox="0 0 24 23.999">
+          <g id="check_circle-24px_1_"
+             data-name="check_circle-24px (1)"
+             transform="translate(0 0)">
+            <path id="Path_797"
+                  data-name="Path 797"
+                  d="M0,0H24V24H0Z"
+                  transform="translate(0 0)"
+                  fill="none" />
+            <path id="Path_798"
+                  data-name="Path 798"
+                  d="M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM9.29,16.289,5.7,12.7a1,1,0,0,1,1.41-1.41L10,14.169l6.88-6.879a1,1,0,0,1,1.41,1.41L10.7,16.289a1,1,0,0,1-1.41,0Z"
+                  transform="translate(0.001 0)"
+                  fill="#10d078" />
+          </g>
+        </svg>
+      </div>
     </div>
   </div>
 </template>
@@ -213,42 +218,44 @@ export default {
 
 <style lang="scss" scoped>
 .VerifyMobileNumber {
-  display: flex;
-  flex-flow: row;
-  justify-content: center;
-  align-items: center;
-  position: relative;
-  .VerifyMobileNumber-input {
-    width: calc( 100% - 130px );
-    &.verified {
-      width: 100%;
-    }
-  }
-  .VerifyMobileNumber-btn {
-    width: 118px;
-    height: 48px;
-    margin-left: 12px;
-  }
-  .VerifyMobileNumber-message {
-    position: absolute;
-    right: 0;
-    bottom: -30px;
-    svg {
-      cursor: pointer;
-    }
-  }
-  .VerifyMobileNumber-timer {
-    position: absolute;
-    right: 135px;
-    bottom: 13px;
-  }
-  .VerifyMobileNumber-verified-mark {
-    position: absolute;
-    right: 15px;
-    bottom: 12px;
+  .contents {
     display: flex;
-    align-items: center;
+    flex-flow: row;
     justify-content: center;
+    align-items: center;
+    position: relative;
+    .VerifyMobileNumber-input {
+      width: calc( 100% - 130px );
+      &.verified {
+        width: 100%;
+      }
+    }
+    .VerifyMobileNumber-btn {
+      width: 118px;
+      height: 48px;
+      margin-left: 12px;
+    }
+    .VerifyMobileNumber-message {
+      position: absolute;
+      right: 0;
+      bottom: -30px;
+      svg {
+        cursor: pointer;
+      }
+    }
+    .VerifyMobileNumber-timer {
+      position: absolute;
+      right: 135px;
+      bottom: 13px;
+    }
+    .VerifyMobileNumber-verified-mark {
+      position: absolute;
+      right: 15px;
+      bottom: 12px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
   }
 }
 </style>

+ 21 - 3
src/pages/User/Profile/profile.vue

@@ -14,7 +14,7 @@
                :show-save-button="false"
                :show-reload-button="false">
     <template #after-form-builder>
-      <div class="flex justify-end">
+      <div class="flex justify-end q-mt-md">
         <q-btn color="primary"
                label="تایید اطلاعات تکمیلی"
                @click="editEntity" />
@@ -29,6 +29,7 @@
 <script>
 import { shallowRef } from 'vue'
 import { EntityEdit } from 'quasar-crud'
+import { User } from 'src/models/User.js'
 import Enums from 'src/assets/Enums/Enums.js'
 import { APIGateway } from 'src/api/APIGateway.js'
 import Warning from 'src/components/other/Warning.vue'
@@ -54,7 +55,7 @@ export default {
       showRouteName: 'UserPanel.Profile.UserInfo',
       inputs: [
         { type: 'separator', name: 'space', placeholder: ' ', label: 'اطلاعات ضروری', className: 'custom-separator', col: 'col-12' },
-        { type: WarningComp, label: 'بعد از تایید اطلاعات ضروری، امکان تغییر این اطلاعات وجود ندارد', col: 'col-12' },
+        { type: WarningComp, name: 'WarningComp', label: 'بعد از تایید اطلاعات ضروری، امکان تغییر این اطلاعات وجود ندارد', col: 'col-12' },
         { type: VerifyEmailComp, name: 'email', placeholder: ' ', label: 'ایمیل', responseKey: 'email', col: 'col-md-6 col-12' },
         { type: VerifyMobileNumberComp, name: 'mobile_number', placeholder: ' ', label: 'تلفن همراه', responseKey: 'mobile_number', col: 'col-md-6 col-12' },
         { type: 'optionGroupRadio', name: 'is_valid_national_code', label: 'اتباع خارجی', options: [{ label: 'نیستم', value: true }, { label: 'هستم', value: false }], value: true, col: 'col-md-6 col-12' },
@@ -110,9 +111,11 @@ export default {
           placeholder: ' ',
           col: 'col-md-6 col-12'
         },
+        { type: 'checkbox', name: 'is_abroad_birth_address', placeholder: ' ', label: 'محل تولد خارج از کشور است؟', responseKey: 'is_abroad_birth_address', col: 'col-12' },
         { type: 'input', name: 'birth_country', placeholder: ' ', label: 'کشور محل تولد', responseKey: 'birth_country', col: 'col-md-6 col-12' },
         { type: 'input', name: 'birth_province', placeholder: ' ', label: 'استان محل تولد', responseKey: 'birth_province', col: 'col-md-6 col-12' },
         { type: 'input', name: 'birth_city', placeholder: ' ', label: 'شهر محل تولد', responseKey: 'birth_city', col: 'col-md-6 col-12' },
+        { type: 'checkbox', name: 'is_abroad_living_address', placeholder: ' ', label: 'محل زندگی فعلی خارج از کشور است؟', responseKey: 'is_abroad_living_address', col: 'col-12' },
         { type: 'input', name: 'living_country', placeholder: ' ', label: 'کشور محل زندگی فعلی', responseKey: 'living_country', col: 'col-md-6 col-12' },
         { type: 'input', name: 'living_province', placeholder: ' ', label: 'استان محل زندگی فعلی', responseKey: 'living_province', col: 'col-md-6 col-12' },
         { type: 'input', name: 'living_city', placeholder: ' ', label: 'شهر محل زندگی فعلی', responseKey: 'living_city', col: 'col-md-6 col-12' },
@@ -165,7 +168,22 @@ export default {
       return target.label
     },
     editEntity () {
-      this.$refs.entityEdit.editEntity()
+      this.$refs.entityEdit.editEntity(false)
+        .then(() => {
+          this.$q.notify({
+            message: 'اطلاعات با موفقیت ویرایش شد',
+            type: 'positive'
+          })
+          APIGateway.user.getCurrent()
+            .then((user) => {
+              this.$store.commit('Auth/updateUser', new User(user))
+            })
+            .catch(() => {
+            })
+        })
+        .catch((e) => {
+          console.log(e)
+        })
     }
   }
 }

+ 4 - 4
yarn.lock

@@ -5406,10 +5406,10 @@ quasar-app-extension-q-page-builder@^0.1.51:
   dependencies:
     quasar-ui-q-page-builder "^0.1.51"
 
-quasar-crud@^0.3.50:
-  version "0.3.50"
-  resolved "https://registry.yarnpkg.com/quasar-crud/-/quasar-crud-0.3.50.tgz#98739c901447226675db088fa96134b75654ebfc"
-  integrity sha512-FwUh03+C6rC2E/1hgKEjVXMo4kw7YkErhN+lgFwOFYYYLXKFOBfPGjqojeU2e5fSlI4qsH6mKk1ou0lZCRgzqA==
+quasar-crud@^0.3.52:
+  version "0.3.52"
+  resolved "https://registry.yarnpkg.com/quasar-crud/-/quasar-crud-0.3.52.tgz#f8942531dcb9be0db6d95b0753b27c5a9587a870"
+  integrity sha512-kHhx6ioIS0MinHWQQMcy7Ab8aeTfNLh9hjuftgeUZXfQMJydXLQ3NKa5PbWGSGturgymeDZp3eVki6T2s09Ddw==
   dependencies:
     "@quasar/extras" "^1.16.5"
     axios "^1.4.0"