Changes Update User

This commit is contained in:
Thien Pham Van
2026-02-25 16:18:22 +07:00
parent 285f104403
commit bd6cfd7c4b
2 changed files with 9 additions and 4 deletions

View File

@@ -34,7 +34,8 @@
<div class="field-body">
<div class="field">
<label class="label"
>{{!dealer? isVietnamese ? 'Họ và tên' : 'Full name': isVietnamese ? 'Tên tài khoản' : 'Dealer name' }}<b class="ml-1 has-text-danger">*</b></label
>{{ !dealer ? (isVietnamese ? 'Họ và tên' : 'Full name') : isVietnamese ? 'Tên tài khoản' : 'Dealer name'
}}<b class="ml-1 has-text-danger">*</b></label
>
<div class="control">
<input class="input" type="text" placeholder="" v-model="fullname" />
@@ -274,6 +275,9 @@ export default {
copy.user = this.user.id;
await this.$updaterow(this.api, copy, found.params.values, this.pagename);
} else {
let app = await this.$getdata('apps', { code: 'application' }, undefined, false);
let obj = { user: this.user.id, apps: app[0]?.id || null };
await this.$insertapi('userapps', obj, undefined, false);
//send email
if (this.email) {
let loginUrl = this.$mode === 'dev' ? 'https://dev.biz.utopia.com.vn/' : 'https://biz.utopia.com.vn/';
@@ -284,7 +288,8 @@ export default {
let copy = this.$copy(this.row);
copy.user = this.user.id;
await this.$updaterow('dealer', copy, null, this.pagename);
let obj = { user: this.user.id, apps: 11 };
let app = await this.$getdata('apps', { code: 'dealer' }, undefined, false);
let obj = { user: this.user.id, apps: app[0]?.id || null };
await this.$insertapi('userapps', obj, undefined, false);
let loginUrl = this.$mode === 'dev' ? 'https://dev.dealer.utopia.com.vn/' : 'https://dealer.utopia.com.vn/';
await this.templateEmail(loginUrl);
@@ -346,7 +351,7 @@ export default {
<tr>
<td align="center"
style="padding:20px; font-size:12px; color:#777777; border-top:1px solid #eeeeee;">
© ${new Date().getFullYear()} Utopia. All rights reserved.<br/>
© ${new Date().getFullYear()} Utopia Villas & Resort. All rights reserved.<br/>
Đây là email tự động, vui lòng không phản hồi email này.
</td>
</tr>

View File

@@ -162,7 +162,7 @@ async function sendEmailAlter(loginUrl, fullname, username, password, email, dea
<tr>
<td align="center"
style="padding:20px; font-size:12px; color:#777777; border-top:1px solid #eeeeee;">
© ${new Date().getFullYear()} Utopia. All rights reserved.<br/>
© ${new Date().getFullYear()} Utopia Villas & Resort. All rights reserved.<br/>
Đây là email tự động, vui lòng không phản hồi email này.
</td>
</tr>