updated
This commit is contained in:
+12
-12
@@ -4,11 +4,11 @@ VITE_APP_DEMO="mgm_cms"
|
|||||||
VITE_APP_FULL_NAME="MCRM CMS"
|
VITE_APP_FULL_NAME="MCRM CMS"
|
||||||
# VITE_APP_API_URL="https://sep.willtechmo.com/crm_api" #willtech
|
# VITE_APP_API_URL="https://sep.willtechmo.com/crm_api" #willtech
|
||||||
# VITE_APP_API_URL="https://localhost/crm_api"
|
# VITE_APP_API_URL="https://localhost/crm_api"
|
||||||
VITE_APP_API_URL="https://mmhcmdevcms11/crm_api" #dev
|
# VITE_APP_API_URL="https://mmhcmdevcms11/crm_api" #dev
|
||||||
# VITE_APP_API_URL="https://vmhcmprdcms01.mgm.mo/crm_api" #prd
|
VITE_APP_API_URL="https://vmhcmprdcms11.mgmmacao.org/crm_api" #prd
|
||||||
# VITE_WEB_APP_API_URL="https://sep.willtechmo.com/api" #willtech
|
# VITE_WEB_APP_API_URL="https://sep.willtechmo.com/api" #willtech
|
||||||
VITE_WEB_APP_API_URL="https://dlahcadev.mcmsapoc.com/api" #dev
|
# VITE_WEB_APP_API_URL="https://dlahcadev.mcmsapoc.com/api" #dev
|
||||||
# VITE_WEB_APP_API_URL="https://hostcrmapp.mgm.mo/api" #prd
|
VITE_WEB_APP_API_URL="https://hostcrmapp.mgm.mo/api" #prd
|
||||||
VITE_APP_BOOTSTRAP_DOCS_LINK="https://getbootstrap.com/docs/5.0"
|
VITE_APP_BOOTSTRAP_DOCS_LINK="https://getbootstrap.com/docs/5.0"
|
||||||
VITE_APP_SASS_COMPONENTS_PATH="src/assets/sass/core/components"
|
VITE_APP_SASS_COMPONENTS_PATH="src/assets/sass/core/components"
|
||||||
VITE_APP_PREVIEW_LINK="https://preview.keenthemes.com/metronic8/vue/demo1/#/dashboard"
|
VITE_APP_PREVIEW_LINK="https://preview.keenthemes.com/metronic8/vue/demo1/#/dashboard"
|
||||||
@@ -21,12 +21,12 @@ VITE_APP_FACEBOOK="https://www.facebook.com/keenthemes"
|
|||||||
VITE_APP_DRIBBBLE="https://dribbble.com/keenthemes"
|
VITE_APP_DRIBBBLE="https://dribbble.com/keenthemes"
|
||||||
# VITE_APP_BASE_URL="https://sep.willtechmo.com/mcrm_cms_admin_daylight" #willtech
|
# VITE_APP_BASE_URL="https://sep.willtechmo.com/mcrm_cms_admin_daylight" #willtech
|
||||||
# VITE_APP_BASE_URL="https://localhost/mcrm_cms_admin"
|
# VITE_APP_BASE_URL="https://localhost/mcrm_cms_admin"
|
||||||
VITE_APP_BASE_URL="https://mmhcmdevcms11/mcrm_cms_admin" #dev
|
# VITE_APP_BASE_URL="https://mmhcmdevcms11/mcrm_cms_admin" #dev
|
||||||
# VITE_APP_BASE_URL="https://vmhcmprdcms01.mgm.mo/mcrm_cms_admin" #prd
|
VITE_APP_BASE_URL="https://vmhcmprdcms11.mgmmacao.org/mcrm_cms_admin" #prd
|
||||||
VITE_ADFS_AUTH_URL="https://adfs.mgm.mo/adfs/ls/"
|
VITE_ADFS_AUTH_URL="https://adfs.mgm.mo/adfs/ls/"
|
||||||
VITE_ADFS_CLIENT_ID="mgm_mobilecrm_cms_dev" #dev
|
# VITE_ADFS_CLIENT_ID="mgm_mobilecrm_cms_dev" #dev
|
||||||
VITE_ADFS_REDIECT_URL="https://mmhcmdevcms11/mcrm_cms_admin/" #dev
|
# VITE_ADFS_REDIECT_URL="https://mmhcmdevcms11/mcrm_cms_admin/" #dev
|
||||||
VITE_ADFS_SIGNOFF_URL="https://mmhcmdevcms11/mcrm_cms_admin/sign-off" #dev
|
# VITE_ADFS_SIGNOFF_URL="https://mmhcmdevcms11/mcrm_cms_admin/sign-off" #dev
|
||||||
# VITE_ADFS_CLIENT_ID="mgm_mobilecrm_cms_prd" #prd
|
VITE_ADFS_CLIENT_ID="mgm_mobilecrm_dl_cms" #prd
|
||||||
# VITE_ADFS_REDIECT_URL="https://vmhcmprdcms01.mgm.mo/mcrm_cms_admin/" #prd
|
VITE_ADFS_REDIECT_URL="https://vmhcmprdcms11.mgmmacao.org/mcrm_cms_admin/" #prd
|
||||||
# VITE_ADFS_SIGNOFF_URL="https://vmhcmprdcms01.mgm.mo/mcrm_cms_admin/sign-off" #prd
|
VITE_ADFS_SIGNOFF_URL="https://vmhcmprdcms11.mgmmacao.org/mcrm_cms_admin/sign-off" #prd
|
||||||
|
|||||||
+10
-3
@@ -2,6 +2,9 @@
|
|||||||
"name": "demo1",
|
"name": "demo1",
|
||||||
"version": "8.1.7",
|
"version": "8.1.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.19.0"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "run-p type-check build-only",
|
"build": "run-p type-check build-only",
|
||||||
@@ -31,7 +34,7 @@
|
|||||||
"bootstrap-icons": "^1.9.1",
|
"bootstrap-icons": "^1.9.1",
|
||||||
"clipboard": "^2.0.6",
|
"clipboard": "^2.0.6",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"deepmerge": "^4.2.2",
|
"deepmerge-ts": "^8.0.2",
|
||||||
"dropzone": "^5.9.3",
|
"dropzone": "^5.9.3",
|
||||||
"element-plus": "^2.2.4",
|
"element-plus": "^2.2.4",
|
||||||
"js-base64": "^3.7.7",
|
"js-base64": "^3.7.7",
|
||||||
@@ -43,7 +46,6 @@
|
|||||||
"pinia": "^2.0.23",
|
"pinia": "^2.0.23",
|
||||||
"prism-themes": "^1.9.0",
|
"prism-themes": "^1.9.0",
|
||||||
"prismjs": "^1.25.0",
|
"prismjs": "^1.25.0",
|
||||||
"quill": "^2.0.3",
|
|
||||||
"ramda": "^0.30.0",
|
"ramda": "^0.30.0",
|
||||||
"socicon": "^3.0.5",
|
"socicon": "^3.0.5",
|
||||||
"sweetalert2": "^11.6.8",
|
"sweetalert2": "^11.6.8",
|
||||||
@@ -64,7 +66,6 @@
|
|||||||
"@types/node": "^18.0.0",
|
"@types/node": "^18.0.0",
|
||||||
"@types/object-path": "^0.11.0",
|
"@types/object-path": "^0.11.0",
|
||||||
"@types/prismjs": "^1.26.0",
|
"@types/prismjs": "^1.26.0",
|
||||||
"@types/quill": "^2.0.9",
|
|
||||||
"@vitejs/plugin-vue": "^5.2.4",
|
"@vitejs/plugin-vue": "^5.2.4",
|
||||||
"@vue/tsconfig": "^0.1.3",
|
"@vue/tsconfig": "^0.1.3",
|
||||||
"array-sort": "^1.0.0",
|
"array-sort": "^1.0.0",
|
||||||
@@ -75,5 +76,11 @@
|
|||||||
"typescript": "^5.9.2",
|
"typescript": "^5.9.2",
|
||||||
"vite": "^6.3.6",
|
"vite": "^6.3.6",
|
||||||
"vue-tsc": "^2.2.12"
|
"vue-tsc": "^2.2.12"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"nanoid": "5.1.16"
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"nanoid": "5.1.16"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ export default defineComponent({
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "bootstrap-icons/font/bootstrap-icons.css";
|
@import "bootstrap-icons/font/bootstrap-icons.css";
|
||||||
@import "apexcharts/dist/apexcharts.css";
|
@import "apexcharts/dist/apexcharts.css";
|
||||||
@import "quill/dist/quill.snow.css";
|
//@import "quill/dist/quill.snow.css";
|
||||||
@import "animate.css";
|
@import "animate.css";
|
||||||
@import "sweetalert2/dist/sweetalert2.css";
|
@import "sweetalert2/dist/sweetalert2.css";
|
||||||
@import "nouislider/distribute/nouislider.css";
|
@import "nouislider/distribute/nouislider.css";
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
/* eslint-disable no-useless-escape */
|
|
||||||
// DOCS: https://javascript.info/cookie
|
|
||||||
export class CookieComponent {
|
|
||||||
/**
|
|
||||||
* Returns the cookie with the given name, or undefined if not found
|
|
||||||
*
|
|
||||||
* @param {string} name - cookie name
|
|
||||||
* @returns string | null
|
|
||||||
*/
|
|
||||||
public static get(name: string): string | undefined {
|
|
||||||
const matches = document.cookie.match(
|
|
||||||
new RegExp(
|
|
||||||
"(?:^|; )" +
|
|
||||||
name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") +
|
|
||||||
"=([^;]*)"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
return matches ? decodeURIComponent(matches[1]) : undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Please note that a cookie value is encoded,
|
|
||||||
* so getCookie uses a built-in decodeURIComponent function to decode it.
|
|
||||||
*
|
|
||||||
* @param {string} name - cookie name
|
|
||||||
* @param {string | number | boolean} value - cookie value
|
|
||||||
* @param {any} cookieOptions - cookie options
|
|
||||||
* @returns void
|
|
||||||
*/
|
|
||||||
public static set(
|
|
||||||
name: string,
|
|
||||||
value: string | number | boolean,
|
|
||||||
cookieOptions: any
|
|
||||||
): void {
|
|
||||||
const options = {
|
|
||||||
path: "/",
|
|
||||||
secure: true,
|
|
||||||
// add other defaults here if necessary
|
|
||||||
...cookieOptions,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (options.expires instanceof Date) {
|
|
||||||
options.expires = options.expires.toUTCString();
|
|
||||||
}
|
|
||||||
|
|
||||||
let updatedCookie =
|
|
||||||
encodeURIComponent(name) + "=" + encodeURIComponent(value);
|
|
||||||
|
|
||||||
for (const optionKey in options) {
|
|
||||||
updatedCookie += "; " + optionKey;
|
|
||||||
const optionValue = options[optionKey];
|
|
||||||
if (optionValue !== true) {
|
|
||||||
updatedCookie += "=" + optionValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
document.cookie = updatedCookie;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To delete a cookie, we can call it with a negative expiration date
|
|
||||||
*
|
|
||||||
* @param {string} name
|
|
||||||
*/
|
|
||||||
public static delete(name: string): void {
|
|
||||||
CookieComponent.set(name, "", {
|
|
||||||
"max-age": -1,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
getCSS,
|
getCSS,
|
||||||
ElementStyleUtil,
|
ElementStyleUtil,
|
||||||
} from "../_utils/index";
|
} from "../_utils/index";
|
||||||
import { CookieComponent } from "./_CookieComponent";
|
//import { CookieComponent } from "./_CookieComponent";
|
||||||
|
|
||||||
export interface ScrollOptions {
|
export interface ScrollOptions {
|
||||||
saveState?: boolean;
|
saveState?: boolean;
|
||||||
@@ -167,14 +167,14 @@ class ScrollComponent {
|
|||||||
|
|
||||||
private setupState = () => {
|
private setupState = () => {
|
||||||
if (this.getOption("save-state") === true && this.id) {
|
if (this.getOption("save-state") === true && this.id) {
|
||||||
const cookie = CookieComponent.get(this.id + "st");
|
// const cookie = CookieComponent.get(this.id + "st");
|
||||||
if (cookie) {
|
// if (cookie) {
|
||||||
const pos = parseInt(cookie);
|
// const pos = parseInt(cookie);
|
||||||
|
|
||||||
if (pos > 0) {
|
// if (pos > 0) {
|
||||||
this.element.scrollTop = pos;
|
// this.element.scrollTop = pos;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ class ScrollComponent {
|
|||||||
|
|
||||||
private scrollHandler = () => {
|
private scrollHandler = () => {
|
||||||
const cookieId = this.id + "st";
|
const cookieId = this.id + "st";
|
||||||
CookieComponent.set(cookieId, this.element.scrollTop, {});
|
//CookieComponent.set(cookieId, this.element.scrollTop, {});
|
||||||
};
|
};
|
||||||
|
|
||||||
private destroyScrollHandler = () => {
|
private destroyScrollHandler = () => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
EventHandlerUtil,
|
EventHandlerUtil,
|
||||||
} from "../_utils/index";
|
} from "../_utils/index";
|
||||||
// Helpers
|
// Helpers
|
||||||
import { CookieComponent } from "./_CookieComponent";
|
//import { CookieComponent } from "./_CookieComponent";
|
||||||
|
|
||||||
export interface ToggleOptions {
|
export interface ToggleOptions {
|
||||||
saveState: boolean;
|
saveState: boolean;
|
||||||
@@ -98,7 +98,7 @@ class ToggleComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.saveState) {
|
if (this.options.saveState) {
|
||||||
CookieComponent.set(this.attribute, "on", {});
|
//CookieComponent.set(this.attribute, "on", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
EventHandlerUtil.trigger(this.element, "kt.toggle.enabled");
|
EventHandlerUtil.trigger(this.element, "kt.toggle.enabled");
|
||||||
@@ -118,7 +118,7 @@ class ToggleComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.saveState) {
|
if (this.options.saveState) {
|
||||||
CookieComponent.delete(this.attribute);
|
//CookieComponent.delete(this.attribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
EventHandlerUtil.trigger(this.element, "kt.toggle.disabled");
|
EventHandlerUtil.trigger(this.element, "kt.toggle.disabled");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export * from "./_CookieComponent";
|
//export * from "./_CookieComponent";
|
||||||
export * from "./_DrawerComponent";
|
export * from "./_DrawerComponent";
|
||||||
export * from "./_FeedbackComponent";
|
export * from "./_FeedbackComponent";
|
||||||
export * from "./_ImageInputComponent";
|
export * from "./_ImageInputComponent";
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getAssetPath } from "@/core/helpers/assets";
|
import { getAssetPath } from "@/core/helpers/assets";
|
||||||
import { defineComponent, onMounted } from "vue";
|
import { defineComponent, onMounted } from "vue";
|
||||||
import Quill from "quill";
|
//import Quill from "quill";
|
||||||
import Dropdown2 from "@/components/dropdown/Dropdown2.vue";
|
import Dropdown2 from "@/components/dropdown/Dropdown2.vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -125,7 +125,7 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Init editor
|
// Init editor
|
||||||
new Quill("#" + editorId, options);
|
//new Quill("#" + editorId, options);
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const messages = {
|
|||||||
newTarget: "New Target",
|
newTarget: "New Target",
|
||||||
newCard: "New Card",
|
newCard: "New Card",
|
||||||
newAddress: "New Address",
|
newAddress: "New Address",
|
||||||
createAPIKey: "Create API Key",
|
createAccessToken: "Create Access Token",
|
||||||
twoFactorAuth: "Two Factor Auth",
|
twoFactorAuth: "Two Factor Auth",
|
||||||
createApp: "Create App",
|
createApp: "Create App",
|
||||||
createAccount: "Create Account",
|
createAccount: "Create Account",
|
||||||
|
|||||||
@@ -65,6 +65,12 @@
|
|||||||
<div id="divButtons" class="app-toolbar py-3 py-lg-6">
|
<div id="divButtons" class="app-toolbar py-3 py-lg-6">
|
||||||
|
|
||||||
<div class="d-flex align-items-right gap-2 gap-lg-3" style="margin-left: auto;">
|
<div class="d-flex align-items-right gap-2 gap-lg-3" style="margin-left: auto;">
|
||||||
|
<button
|
||||||
|
v-if="authStore.hasPermission(pageRouterId,'MODIFY')"
|
||||||
|
type="button"
|
||||||
|
class="btn btn-sm btn-primary fw-bold"
|
||||||
|
@click="onBatchEditChannelHandle"
|
||||||
|
>Batch Edit App Channel</button>
|
||||||
<button v-if="authStore.hasPermission(pageRouterId, 'MODIFY')" type="button"
|
<button v-if="authStore.hasPermission(pageRouterId, 'MODIFY')" type="button"
|
||||||
class="btn btn-sm btn-primary fw-bold" @click="onBatchClickHandle(0)">No Sharer</button>
|
class="btn btn-sm btn-primary fw-bold" @click="onBatchClickHandle(0)">No Sharer</button>
|
||||||
|
|
||||||
|
|||||||
@@ -249,7 +249,7 @@
|
|||||||
let propertyData = ref({});
|
let propertyData = ref({});
|
||||||
let roomData = ref({});
|
let roomData = ref({});
|
||||||
const selectedIds = ref([]);
|
const selectedIds = ref([]);
|
||||||
const pageRouterId = '00314';
|
const pageRouterId = '00328';
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const css = ref<String>("");
|
const css = ref<String>("");
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ export default defineComponent({
|
|||||||
searchDepartment: "",
|
searchDepartment: "",
|
||||||
searchSection: "",
|
searchSection: "",
|
||||||
});
|
});
|
||||||
const pageRouterId = "00313";
|
const pageRouterId = "00327";
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const css = ref<String>("");
|
const css = ref<String>("");
|
||||||
|
|||||||
@@ -263,13 +263,6 @@ export default defineComponent({
|
|||||||
resizable: true,
|
resizable: true,
|
||||||
cellClass: "cell-vertical-align-text-left",
|
cellClass: "cell-vertical-align-text-left",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
headerName: "Hotel Code",
|
|
||||||
field: "hotelCode",
|
|
||||||
minWidth: 100,
|
|
||||||
resizable: true,
|
|
||||||
cellClass: "cell-vertical-align-text-left",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
headerName: "Property Code",
|
headerName: "Property Code",
|
||||||
field: "code",
|
field: "code",
|
||||||
@@ -284,6 +277,27 @@ export default defineComponent({
|
|||||||
resizable: true,
|
resizable: true,
|
||||||
cellClass: "cell-vertical-align-text-left",
|
cellClass: "cell-vertical-align-text-left",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
headerName: "Sort Order",
|
||||||
|
field: "sortOrderVal",
|
||||||
|
minWidth: 100,
|
||||||
|
resizable: true,
|
||||||
|
cellClass: "cell-vertical-align-text-left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headerName: "Created Time",
|
||||||
|
field: "createdTime",
|
||||||
|
minWidth: 160,
|
||||||
|
resizable: true,
|
||||||
|
cellClass: "cell-vertical-align-text-left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headerName: "Updated Time",
|
||||||
|
field: "updatedTime",
|
||||||
|
minWidth: 160,
|
||||||
|
resizable: true,
|
||||||
|
cellClass: "cell-vertical-align-text-left",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
headerName: "Validate Status",
|
headerName: "Validate Status",
|
||||||
field: "validatePassed",
|
field: "validatePassed",
|
||||||
|
|||||||
@@ -151,6 +151,36 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--end::Input-->
|
<!--end::Input-->
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6 fv-row">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<label class="required fs-6 fw-semobold mb-2"
|
||||||
|
>Status</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="status">
|
||||||
|
<el-switch
|
||||||
|
v-model="propertyData.status"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
:disabled="!enableEdit"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<label class="required fs-6 fw-semobold mb-2"
|
||||||
|
>Display Type</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="displayType">
|
||||||
|
<el-switch
|
||||||
|
v-model="propertyData.displayType"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
:disabled="!enableEdit"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-6 fv-row">
|
<div class="col-md-6 fv-row">
|
||||||
<!--begin::Label-->
|
<!--begin::Label-->
|
||||||
<label class="required fs-6 fw-semobold mb-2"
|
<label class="required fs-6 fw-semobold mb-2"
|
||||||
|
|||||||
@@ -231,6 +231,7 @@
|
|||||||
multiple
|
multiple
|
||||||
placeholder="Select"
|
placeholder="Select"
|
||||||
:disabled="!enableEdit"
|
:disabled="!enableEdit"
|
||||||
|
:teleported="false"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roomTypeData"
|
v-for="item in roomTypeData"
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
showSelect:false,
|
showSelect:false,
|
||||||
selectRecord:0
|
selectRecord:0
|
||||||
});
|
});
|
||||||
const pageRouterId = '00501';
|
const pageRouterId = '00401';
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const css = ref<String>("");
|
const css = ref<String>("");
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ import RequestReasonModalEditor from "./Modal.vue";
|
|||||||
searchName:'',
|
searchName:'',
|
||||||
searchCode:'',
|
searchCode:'',
|
||||||
});
|
});
|
||||||
const pageRouterId = '00316';
|
const pageRouterId = '00602';
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const css = ref<String>("");
|
const css = ref<String>("");
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
configData.value.CALENDAR_VIEW_YESTERDAY_START,
|
configData.value.CALENDAR_VIEW_YESTERDAY_START,
|
||||||
configData.value.CALENDAR_VIEW_YESTERDAY_END,
|
configData.value.CALENDAR_VIEW_YESTERDAY_END,
|
||||||
]);
|
]);
|
||||||
const pageRouterId = "00330";
|
const pageRouterId = "00530";
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const enableModify = authStore.hasPermission(pageRouterId, "MODIFY");
|
const enableModify = authStore.hasPermission(pageRouterId, "MODIFY");
|
||||||
const formRef = ref<any>(null);
|
const formRef = ref<any>(null);
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
let blo = blockCodeData.value;
|
let blo = blockCodeData.value;
|
||||||
for (let j = 0; j < blo.length; j++) {
|
for (let j = 0; j < blo.length; j++) {
|
||||||
blo[j].appChannel = 0;
|
blo[j].channelTotal = 0;
|
||||||
blo[j].pickedUp = 0;
|
blo[j].pickedUp = 0;
|
||||||
blo[j].available = 0;
|
blo[j].available = 0;
|
||||||
}
|
}
|
||||||
@@ -492,16 +492,25 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const saveOrUpdateInfo = (dataObj: object) => {
|
const saveOrUpdateInfo = (dataObj: any) => {
|
||||||
if (dataObj) {
|
if (dataObj) {
|
||||||
dataObj.appChannel = blockCodeData.value;
|
const requestData: any = {
|
||||||
|
...dataObj,
|
||||||
|
blockCodeChannels: (blockCodeData.value ?? []).map((item) => ({
|
||||||
|
blockCodeId: item.blockCodeId ?? item.id,
|
||||||
|
channelTotal: item.channelTotal ?? 0,
|
||||||
|
pickedUp: item.pickedUp ?? 0,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
delete requestData.appChannel;
|
||||||
|
delete requestData.channels;
|
||||||
let postUrl =
|
let postUrl =
|
||||||
dataObj.id == null
|
requestData.id == null
|
||||||
? "/app/criteria_daylight/create"
|
? "/app/criteria_daylight/create"
|
||||||
: "/app/criteria_daylight/update";
|
: "/app/criteria_daylight/update";
|
||||||
ApiService.processPostRequest(
|
ApiService.processPostRequest(
|
||||||
postUrl,
|
postUrl,
|
||||||
dataObj,
|
requestData,
|
||||||
(resData: ResponseData) => {
|
(resData: ResponseData) => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -280,6 +280,81 @@ export default defineComponent({
|
|||||||
resizable: true,
|
resizable: true,
|
||||||
cellRenderer: getCode,
|
cellRenderer: getCode,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
headerName: "Approver",
|
||||||
|
sortable: true,
|
||||||
|
unSortIcon: true,
|
||||||
|
field: "approver",
|
||||||
|
minWidth: 150,
|
||||||
|
resizable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headerName: "Category",
|
||||||
|
sortable: true,
|
||||||
|
unSortIcon: true,
|
||||||
|
field: "compRuleCategory",
|
||||||
|
minWidth: 150,
|
||||||
|
resizable: true,
|
||||||
|
cellRenderer: (pData) => {
|
||||||
|
let val = pData.value;
|
||||||
|
|
||||||
|
if (val == 1) {
|
||||||
|
return "Room Only";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val == 2) {
|
||||||
|
return "Room & Misc charge";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headerName: "Complimentary Type",
|
||||||
|
sortable: true,
|
||||||
|
unSortIcon: true,
|
||||||
|
field: "compTypeContent",
|
||||||
|
minWidth: 150,
|
||||||
|
resizable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headerName: "Payment Method Code",
|
||||||
|
sortable: true,
|
||||||
|
unSortIcon: true,
|
||||||
|
field: "paymentMethodCodeContent",
|
||||||
|
minWidth: 150,
|
||||||
|
resizable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headerName: "Complimentary Preset",
|
||||||
|
sortable: true,
|
||||||
|
unSortIcon: true,
|
||||||
|
field: "cfgCompPresetList",
|
||||||
|
minWidth: 150,
|
||||||
|
resizable: true,
|
||||||
|
cellRenderer: (pData) => {
|
||||||
|
let val = pData.value;
|
||||||
|
let nameArr = [];
|
||||||
|
if (val != null) {
|
||||||
|
for (let i = 0; i < val.length; i++) {
|
||||||
|
nameArr.push(val[i].compPresetContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nameArr.join(", ");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headerName: "Soft Limit",
|
||||||
|
sortable: true,
|
||||||
|
unSortIcon: true,
|
||||||
|
field: "softLimit",
|
||||||
|
minWidth: 150,
|
||||||
|
resizable: true,
|
||||||
|
cellRenderer: (pData) => {
|
||||||
|
let val = pData.value;
|
||||||
|
return val != null && val !== "" ? val + "%" : "";
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
headerName: "Operations",
|
headerName: "Operations",
|
||||||
field: "id",
|
field: "id",
|
||||||
|
|||||||
@@ -202,6 +202,121 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row g-9 mb-6">
|
||||||
|
<div class="col-md-6 fv-row">
|
||||||
|
<label class="fs-6 fw-semobold mb-2"
|
||||||
|
>Approver</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="approver">
|
||||||
|
<el-input
|
||||||
|
v-model="data.approver"
|
||||||
|
type="text"
|
||||||
|
placeholder=""
|
||||||
|
:readonly="!enableEdit"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 fv-row">
|
||||||
|
<label class="fs-6 fw-semobold mb-2"
|
||||||
|
>Category</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="compRuleCategory">
|
||||||
|
<el-select
|
||||||
|
v-model="data.compRuleCategory"
|
||||||
|
placeholder="Select"
|
||||||
|
:disabled="!enableEdit"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
label="Room only"
|
||||||
|
:value="1"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
label="Room & Misc charge field input"
|
||||||
|
:value="2"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 fv-row">
|
||||||
|
<label class="fs-6 fw-semobold mb-2"
|
||||||
|
>Complimentary Type</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="dlCompTypeId">
|
||||||
|
<el-select
|
||||||
|
v-model="data.dlCompTypeId"
|
||||||
|
placeholder="Select"
|
||||||
|
:disabled="!enableEdit"
|
||||||
|
@change="handleCompTypeChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in complimentaryTypeList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.enContent"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 fv-row">
|
||||||
|
<label class="fs-6 fw-semobold mb-2"
|
||||||
|
>Payment Method Code</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="dlPaymentMethodCodeId">
|
||||||
|
<el-select
|
||||||
|
v-model="data.dlPaymentMethodCodeId"
|
||||||
|
placeholder="Select"
|
||||||
|
:disabled="!enableEdit"
|
||||||
|
@change="handlePaymentMethodCodeChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in paymentMethodCodeList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.parentDescription + ' - ' + item.descriptions"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 fv-row">
|
||||||
|
<label class="fs-6 fw-semobold mb-2"
|
||||||
|
>Complimentary Preset</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="dlCompPresetIds">
|
||||||
|
<el-select
|
||||||
|
v-model="data.dlCompPresetIds"
|
||||||
|
placeholder="Select"
|
||||||
|
:disabled="!enableEdit"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
@change="handleCompPresetChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in complimentaryPresetList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.enContent"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 fv-row">
|
||||||
|
<label class="fs-6 fw-semobold mb-2"
|
||||||
|
>Soft Limit</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="softLimit">
|
||||||
|
<el-input
|
||||||
|
v-model="data.softLimit"
|
||||||
|
type="text"
|
||||||
|
placeholder=""
|
||||||
|
:readonly="!enableEdit"
|
||||||
|
@input="handleSoftLimitInput"
|
||||||
|
>
|
||||||
|
<template #append>%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row g-9 mb-6" v-if="disabled">
|
<div class="row g-9 mb-6" v-if="disabled">
|
||||||
<div class="col-md-6 fv-row">
|
<div class="col-md-6 fv-row">
|
||||||
<!--begin::Label-->
|
<!--begin::Label-->
|
||||||
@@ -305,6 +420,9 @@ export default defineComponent({
|
|||||||
let sourceCodeData = ref([]);
|
let sourceCodeData = ref([]);
|
||||||
let marketCodeData = ref([]);
|
let marketCodeData = ref([]);
|
||||||
let roomTypeData = ref([]);
|
let roomTypeData = ref([]);
|
||||||
|
let complimentaryTypeData = ref(new Map());
|
||||||
|
let paymentMethodCodeData = ref(new Map());
|
||||||
|
let complimentaryPresetData = ref(new Map());
|
||||||
const formRef = ref<null | HTMLFormElement>(null);
|
const formRef = ref<null | HTMLFormElement>(null);
|
||||||
const modalRef = ref<null | HTMLElement>(null);
|
const modalRef = ref<null | HTMLElement>(null);
|
||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
@@ -372,12 +490,16 @@ export default defineComponent({
|
|||||||
reqParas,
|
reqParas,
|
||||||
(resData: ResponseData) => {
|
(resData: ResponseData) => {
|
||||||
propertyData.value = resData.data;
|
propertyData.value = resData.data;
|
||||||
|
for (const property of propertyData.value) {
|
||||||
|
fetchComplimentaryType(property.dlPropertyId, property.id);
|
||||||
|
fetchPaymentMethodCode(property.dlPropertyId, property.id);
|
||||||
|
fetchComplimentaryPreset(property.dlPropertyId, property.id);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
(resData: ResponseData) => {},
|
(resData: ResponseData) => {},
|
||||||
(error) => {},
|
(error) => {},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
fetchProperty();
|
|
||||||
|
|
||||||
const fetchBookingType = () => {
|
const fetchBookingType = () => {
|
||||||
let reqParas = {
|
let reqParas = {
|
||||||
@@ -475,6 +597,62 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
fetchRoomType();
|
fetchRoomType();
|
||||||
|
|
||||||
|
const fetchComplimentaryType = (dlPropertyId, propertyId) => {
|
||||||
|
if (dlPropertyId == null || dlPropertyId === "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let reqParas = {
|
||||||
|
dlPropertyId: dlPropertyId
|
||||||
|
};
|
||||||
|
ApiService.processPostRequest(
|
||||||
|
"/app/exception_daylight/daylight_complimentary_type_list",
|
||||||
|
reqParas,
|
||||||
|
(resData: ResponseData) => {
|
||||||
|
complimentaryTypeData.value.set(String(propertyId), resData.data || []);
|
||||||
|
},
|
||||||
|
(resData: ResponseData) => {},
|
||||||
|
(error) => {}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const fetchPaymentMethodCode = (dlPropertyId, propertyId) => {
|
||||||
|
if (dlPropertyId == null || dlPropertyId === "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let reqParas = {
|
||||||
|
dlPropertyId: dlPropertyId
|
||||||
|
};
|
||||||
|
ApiService.processPostRequest(
|
||||||
|
"/app/exception_daylight/daylight_payment_method_code_list",
|
||||||
|
reqParas,
|
||||||
|
(resData: ResponseData) => {
|
||||||
|
paymentMethodCodeData.value.set(String(propertyId), resData.data || []);
|
||||||
|
},
|
||||||
|
(resData: ResponseData) => {},
|
||||||
|
(error) => {}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const fetchComplimentaryPreset = (dlPropertyId, propertyId) => {
|
||||||
|
if (dlPropertyId == null || dlPropertyId === "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let reqParas = {
|
||||||
|
dlPropertyId: dlPropertyId
|
||||||
|
};
|
||||||
|
ApiService.processPostRequest(
|
||||||
|
"/app/exception_daylight/daylight_complimentary_preset_list",
|
||||||
|
reqParas,
|
||||||
|
(resData: ResponseData) => {
|
||||||
|
complimentaryPresetData.value.set(String(propertyId), resData.data || []);
|
||||||
|
},
|
||||||
|
(resData: ResponseData) => {},
|
||||||
|
(error) => {}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
fetchProperty();
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
@@ -487,6 +665,15 @@ export default defineComponent({
|
|||||||
data.value = {
|
data.value = {
|
||||||
id: null,
|
id: null,
|
||||||
name: "",
|
name: "",
|
||||||
|
approver: "",
|
||||||
|
compRuleCategory: null,
|
||||||
|
dlCompTypeId: null,
|
||||||
|
compTypeContent: "",
|
||||||
|
dlPaymentMethodCodeId: null,
|
||||||
|
paymentMethodCodeContent: "",
|
||||||
|
dlCompPresetIds: [],
|
||||||
|
compPresetContents: [],
|
||||||
|
softLimit: "",
|
||||||
};
|
};
|
||||||
actionCallback.value = fCallback;
|
actionCallback.value = fCallback;
|
||||||
showModal(modalRef.value, getModalOption());
|
showModal(modalRef.value, getModalOption());
|
||||||
@@ -645,6 +832,16 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
rdata.roomTypeIds = roomTypeIds;
|
rdata.roomTypeIds = roomTypeIds;
|
||||||
}
|
}
|
||||||
|
if (rdata.cfgCompPresetList != null) {
|
||||||
|
rdata.dlCompPresetIds = rdata.cfgCompPresetList.map(
|
||||||
|
(item) => item.dlCompPresetId ?? item.compPresetId ?? item.id
|
||||||
|
);
|
||||||
|
rdata.compPresetContents = rdata.cfgCompPresetList.map(
|
||||||
|
(item) => item.compPresetContent ?? item.enContent ?? ""
|
||||||
|
);
|
||||||
|
}
|
||||||
|
rdata.dlCompPresetIds = rdata.dlCompPresetIds ?? [];
|
||||||
|
rdata.compPresetContents = rdata.compPresetContents ?? [];
|
||||||
data.value = rdata;
|
data.value = rdata;
|
||||||
showModal(modalRef.value, getModalOption());
|
showModal(modalRef.value, getModalOption());
|
||||||
},
|
},
|
||||||
@@ -718,6 +915,32 @@ export default defineComponent({
|
|||||||
trigger: "change",
|
trigger: "change",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
softLimit: [
|
||||||
|
{
|
||||||
|
pattern: /^\d+(\.\d+)?$/,
|
||||||
|
message: "Soft Limit must be a number",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (value === '' || value === null || value === undefined) {
|
||||||
|
callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const num = Number(value);
|
||||||
|
if (isNaN(num)) {
|
||||||
|
callback(new Error('Soft Limit must be a number'));
|
||||||
|
} else if (num < 1) {
|
||||||
|
callback(new Error('Soft Limit must be at least 1'));
|
||||||
|
} else if (num > 100) {
|
||||||
|
callback(new Error('Soft Limit must be at most 100'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'change',
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
const validateUserId = () => {
|
const validateUserId = () => {
|
||||||
let pass = true;
|
let pass = true;
|
||||||
@@ -770,6 +993,15 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSoftLimitInput = (value) => {
|
||||||
|
if (!data.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
data.value.softLimit = String(value)
|
||||||
|
.replace(/[^\d.]/g, "")
|
||||||
|
.replace(/\.(?=.*\.)/g, "");
|
||||||
|
};
|
||||||
|
|
||||||
const blockCodeListTemp = computed(() => {
|
const blockCodeListTemp = computed(() => {
|
||||||
const selectId = data.value?.propertyId;
|
const selectId = data.value?.propertyId;
|
||||||
if (selectId == null) {
|
if (selectId == null) {
|
||||||
@@ -793,6 +1025,70 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
const sourceCodeListTemp = computed(() => sourceCodeData.value);
|
const sourceCodeListTemp = computed(() => sourceCodeData.value);
|
||||||
const marketCodeListTemp = computed(() => marketCodeData.value);
|
const marketCodeListTemp = computed(() => marketCodeData.value);
|
||||||
|
const complimentaryTypeList = computed(() => {
|
||||||
|
const selectId = data.value?.propertyId;
|
||||||
|
if (selectId == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return complimentaryTypeData.value.get(String(selectId)) ?? [];
|
||||||
|
});
|
||||||
|
const paymentMethodCodeList = computed(() => {
|
||||||
|
const selectId = data.value?.propertyId;
|
||||||
|
if (selectId == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return paymentMethodCodeData.value.get(String(selectId)) ?? [];
|
||||||
|
});
|
||||||
|
const complimentaryPresetList = computed(() => {
|
||||||
|
const selectId = data.value?.propertyId;
|
||||||
|
if (selectId == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return complimentaryPresetData.value.get(String(selectId)) ?? [];
|
||||||
|
});
|
||||||
|
const paymentMethodCodeLabel = (item) => {
|
||||||
|
return item.parentDescription + ' - ' + item.descriptions;
|
||||||
|
};
|
||||||
|
const syncPaymentMethodCodeContent = (selectId) => {
|
||||||
|
if (!data.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const selectedPaymentMethodCode = paymentMethodCodeList.value.find(
|
||||||
|
(item) => item.id === selectId
|
||||||
|
);
|
||||||
|
data.value.paymentMethodCodeContent = selectedPaymentMethodCode
|
||||||
|
? paymentMethodCodeLabel(selectedPaymentMethodCode)
|
||||||
|
: "";
|
||||||
|
};
|
||||||
|
const handlePaymentMethodCodeChange = (selectId) => {
|
||||||
|
syncPaymentMethodCodeContent(selectId);
|
||||||
|
};
|
||||||
|
const syncCompTypeContent = (selectId) => {
|
||||||
|
if (!data.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const selectedType = complimentaryTypeList.value.find(
|
||||||
|
(item) => item.id === selectId
|
||||||
|
);
|
||||||
|
data.value.compTypeContent = selectedType?.enContent || "";
|
||||||
|
};
|
||||||
|
const handleCompTypeChange = (selectId) => {
|
||||||
|
syncCompTypeContent(selectId);
|
||||||
|
};
|
||||||
|
const syncCompPresetContent = (selectIds) => {
|
||||||
|
if (!data.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
data.value.compPresetContents = (selectIds || []).map((id) => {
|
||||||
|
const selectedPreset = complimentaryPresetList.value.find(
|
||||||
|
(item) => item.id === id
|
||||||
|
);
|
||||||
|
return selectedPreset?.enContent || "";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const handleCompPresetChange = (selectIds) => {
|
||||||
|
syncCompPresetContent(selectIds);
|
||||||
|
};
|
||||||
const handlePropertyChange = (selectId) => {
|
const handlePropertyChange = (selectId) => {
|
||||||
if (!data.value) {
|
if (!data.value) {
|
||||||
return;
|
return;
|
||||||
@@ -803,6 +1099,12 @@ export default defineComponent({
|
|||||||
data.value.roomTypeIds = [];
|
data.value.roomTypeIds = [];
|
||||||
data.value.sourceCodeId = null;
|
data.value.sourceCodeId = null;
|
||||||
data.value.marketCodeId = null;
|
data.value.marketCodeId = null;
|
||||||
|
data.value.dlCompTypeId = null;
|
||||||
|
data.value.compTypeContent = "";
|
||||||
|
data.value.dlPaymentMethodCodeId = null;
|
||||||
|
data.value.paymentMethodCodeContent = "";
|
||||||
|
data.value.dlCompPresetIds = [];
|
||||||
|
data.value.compPresetContents = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -831,11 +1133,18 @@ export default defineComponent({
|
|||||||
roomTypeData,
|
roomTypeData,
|
||||||
formatTime,
|
formatTime,
|
||||||
handlePropertyChange,
|
handlePropertyChange,
|
||||||
|
handleCompTypeChange,
|
||||||
|
handlePaymentMethodCodeChange,
|
||||||
|
handleCompPresetChange,
|
||||||
|
handleSoftLimitInput,
|
||||||
blockCodeListTemp,
|
blockCodeListTemp,
|
||||||
rateCodeListTemp,
|
rateCodeListTemp,
|
||||||
roomTypeListTemp,
|
roomTypeListTemp,
|
||||||
sourceCodeListTemp,
|
sourceCodeListTemp,
|
||||||
marketCodeListTemp
|
marketCodeListTemp,
|
||||||
|
complimentaryTypeList,
|
||||||
|
paymentMethodCodeList,
|
||||||
|
complimentaryPresetList,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -210,12 +210,12 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columnDefs = [
|
const columnDefs = [
|
||||||
{ headerName:"Tier Code" , field: "tierCode", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Tier Code" , field: "daylightTier", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"IGT Tier ID" , field: "igtTierId", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"IGT Tier ID" , field: "igtTierId", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"IGT Tier Name" , field: "igtTierName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"IGT Tier Name" , field: "igtTierName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Property" , field: "propertyName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Property" , field: "propertyName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Room" , field: "roomName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Room" , field: "roomName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Purchase Element" , field: "purchaseElement", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Purchase Element" , field: "dlCode", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Daylight Purchase Element Id" , field: "dlPurchaseElementId", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Daylight Purchase Element Id" , field: "dlPurchaseElementId", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Validate Status" , field: "validatePassed", minWidth:80, maxWidth:120, resizable: false, cellClass: "cell-vertical-align-text-left",
|
{ headerName:"Validate Status" , field: "validatePassed", minWidth:80, maxWidth:120, resizable: false, cellClass: "cell-vertical-align-text-left",
|
||||||
cellRenderer: params => {
|
cellRenderer: params => {
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
let propertyData = ref({});
|
let propertyData = ref({});
|
||||||
let roomData = ref({});
|
let roomData = ref({});
|
||||||
const selectedIds = ref([]);
|
const selectedIds = ref([]);
|
||||||
const pageRouterId = '00514';
|
const pageRouterId = '00528';
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const css = ref<String>("");
|
const css = ref<String>("");
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ export default defineComponent({
|
|||||||
searchDepartment: "",
|
searchDepartment: "",
|
||||||
searchSection: "",
|
searchSection: "",
|
||||||
});
|
});
|
||||||
const pageRouterId = "00513";
|
const pageRouterId = "00527";
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const css = ref<String>("");
|
const css = ref<String>("");
|
||||||
|
|||||||
@@ -218,9 +218,11 @@ export default defineComponent({
|
|||||||
const columnDefs = [
|
const columnDefs = [
|
||||||
{ headerName:"Property Name" , field: "name", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Property Name" , field: "name", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Email Name" , field: "emailName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Email Name" , field: "emailName", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Hotel Code" , field: "hotelCode", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
|
||||||
{ headerName:"Property Code" , field: "code", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Property Code" , field: "code", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Category" , field: "category", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
{ headerName:"Category" , field: "category", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
|
{ headerName:"Sort Order" , field: "sortOrderVal", minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
|
{ headerName:"Created Time" , field: "createdTime", minWidth:160, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
|
{ headerName:"Updated Time" , field: "updatedTime", minWidth:160, resizable: true, cellClass: "cell-vertical-align-text-left" },
|
||||||
{ headerName:"Validate Status" , field: "validatePassed", minWidth:80, maxWidth:120, resizable: false, cellClass: "cell-vertical-align-text-left",
|
{ headerName:"Validate Status" , field: "validatePassed", minWidth:80, maxWidth:120, resizable: false, cellClass: "cell-vertical-align-text-left",
|
||||||
cellRenderer: params => {
|
cellRenderer: params => {
|
||||||
return '<span class="badge badge-' + (params.value===true?'success':'danger') + ' ">' + (params.value===true?'Passed':'Failed') + '</span>';
|
return '<span class="badge badge-' + (params.value===true?'success':'danger') + ' ">' + (params.value===true?'Passed':'Failed') + '</span>';
|
||||||
|
|||||||
@@ -158,19 +158,37 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--end::Input-->
|
<!--end::Input-->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-md-6 fv-row">
|
<div class="col-md-6 fv-row">
|
||||||
<label class="required fs-6 fw-semobold mb-2"
|
<div class="row">
|
||||||
>Status</label
|
<div class="col-6">
|
||||||
>
|
<label class="required fs-6 fw-semobold mb-2"
|
||||||
<el-form-item prop="status">
|
>Status</label
|
||||||
<el-switch
|
>
|
||||||
v-model="propertyData.status"
|
<el-form-item prop="status">
|
||||||
:active-value="1"
|
<el-switch
|
||||||
:inactive-value="0"
|
v-model="propertyData.status"
|
||||||
:disabled="!enableEdit"
|
:active-value="1"
|
||||||
/>
|
:inactive-value="0"
|
||||||
</el-form-item>
|
:disabled="!enableEdit"
|
||||||
</div> -->
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<label class="required fs-6 fw-semobold mb-2"
|
||||||
|
>Display Type</label
|
||||||
|
>
|
||||||
|
<el-form-item prop="displayType">
|
||||||
|
<el-switch
|
||||||
|
v-model="propertyData.displayType"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
:disabled="!enableEdit"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6 fv-row">
|
<div class="col-md-6 fv-row">
|
||||||
<!--begin::Label-->
|
<!--begin::Label-->
|
||||||
<label class="required fs-6 fw-semobold mb-2"
|
<label class="required fs-6 fw-semobold mb-2"
|
||||||
|
|||||||
@@ -232,6 +232,7 @@
|
|||||||
multiple
|
multiple
|
||||||
placeholder="Select"
|
placeholder="Select"
|
||||||
:disabled="!enableEdit"
|
:disabled="!enableEdit"
|
||||||
|
:teleported="false"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roomTypeOptionsByProperty"
|
v-for="item in roomTypeOptionsByProperty"
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
searchUserId:' ',
|
searchUserId:' ',
|
||||||
searchPlayerId: ' '
|
searchPlayerId: ' '
|
||||||
});
|
});
|
||||||
const pageRouterId = '00805';
|
const pageRouterId = '00806';
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const css = ref<String>("");
|
const css = ref<String>("");
|
||||||
|
|||||||
@@ -899,11 +899,11 @@ export default defineComponent({
|
|||||||
debounce = setTimeout(() => {
|
debounce = setTimeout(() => {
|
||||||
if (
|
if (
|
||||||
data !== "" &&
|
data !== "" &&
|
||||||
data.length == 8
|
data.length > 4
|
||||||
) {
|
) {
|
||||||
getPlayerData(data,true);
|
getPlayerData(data,true);
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 3000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
@@ -943,7 +943,7 @@ export default defineComponent({
|
|||||||
debounce = setTimeout(() => {
|
debounce = setTimeout(() => {
|
||||||
if (
|
if (
|
||||||
sharer != "" &&
|
sharer != "" &&
|
||||||
sharer.playerId.length == 8
|
sharer.playerId.length > 4
|
||||||
) {
|
) {
|
||||||
|
|
||||||
let reqParas = { 'playerId': sharer.playerId }
|
let reqParas = { 'playerId': sharer.playerId }
|
||||||
@@ -970,7 +970,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 3000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,8 +188,10 @@
|
|||||||
{ headerName:"Booker" , field: "booker",sortable: true,unSortIcon: true, minWidth:150 , resizable: true,
|
{ headerName:"Booker" , field: "booker",sortable: true,unSortIcon: true, minWidth:150 , resizable: true,
|
||||||
cellRenderer:getBooker
|
cellRenderer:getBooker
|
||||||
},
|
},
|
||||||
{ headerName:"Section" , field: "teamObj",sortable: true,unSortIcon: true, minWidth:150 , resizable: true,
|
{ headerName:"Section" , field: "sectionName",sortable: true,unSortIcon: true, minWidth:150 , resizable: true
|
||||||
cellRenderer:getSection },
|
},
|
||||||
|
{ headerName:"Approver Id" , field: "approvedId",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, },
|
||||||
|
{ headerName:"Approved Reason" , field: "bookingApprovalReason",sortable: true,unSortIcon: true, minWidth:170 , resizable: true, },
|
||||||
{ headerName:"Remarks By MSC" , field: "mscRemark",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, },
|
{ headerName:"Remarks By MSC" , field: "mscRemark",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, },
|
||||||
{ headerName:"Updated By" , field: "updatedBy",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, },
|
{ headerName:"Updated By" , field: "updatedBy",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, },
|
||||||
{ headerName:"Updated Time" , field: "updatedAt",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, },
|
{ headerName:"Updated Time" , field: "updatedAt",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, },
|
||||||
|
|||||||
@@ -942,11 +942,11 @@ export default defineComponent({
|
|||||||
debounce = setTimeout(() => {
|
debounce = setTimeout(() => {
|
||||||
if (
|
if (
|
||||||
data !== "" &&
|
data !== "" &&
|
||||||
data.length == 8
|
data.length > 4
|
||||||
) {
|
) {
|
||||||
getPlayerData(data,true);
|
getPlayerData(data,true);
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 3000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
@@ -992,7 +992,7 @@ export default defineComponent({
|
|||||||
debounce = setTimeout(() => {
|
debounce = setTimeout(() => {
|
||||||
if (
|
if (
|
||||||
sharer != "" &&
|
sharer != "" &&
|
||||||
sharer.playerId.length == 8
|
sharer.playerId.length >4
|
||||||
) {
|
) {
|
||||||
|
|
||||||
let reqParas = { 'playerId': sharer.playerId }
|
let reqParas = { 'playerId': sharer.playerId }
|
||||||
@@ -1019,7 +1019,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 3000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,10 +106,11 @@
|
|||||||
<div class="fv-row">
|
<div class="fv-row">
|
||||||
<label class=" fs-6 fw-semobold mb-2 ">Mkt Code</label>
|
<label class=" fs-6 fw-semobold mb-2 ">Mkt Code</label>
|
||||||
<el-select v-model="pageFilters.searchMarketCode" placeholder="Select"
|
<el-select v-model="pageFilters.searchMarketCode" placeholder="Select"
|
||||||
clearable
|
:clearable="isMSC"
|
||||||
|
:disabled="!isMSC"
|
||||||
style="width:100px;">
|
style="width:100px;">
|
||||||
<el-option v-for="item in marketCodeData" :key="item.id" :label="item.name"
|
<el-option v-for="item in marketCodeData" :key="item.id" :label="item.code"
|
||||||
:value="item.name" />
|
:value="item.code" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -118,8 +119,8 @@
|
|||||||
<el-select v-model="pageFilters.searchSourceCode" placeholder="Select"
|
<el-select v-model="pageFilters.searchSourceCode" placeholder="Select"
|
||||||
clearable
|
clearable
|
||||||
style="width:100px;">
|
style="width:100px;">
|
||||||
<el-option v-for="item in sourceCodeData" :key="item.id" :label="item.name"
|
<el-option v-for="item in sourceCodeData" :key="item.id" :label="item.code"
|
||||||
:value="item.name" />
|
:value="item.code" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1308,6 +1309,7 @@ import { dataType } from "element-plus/es/components/table-v2/src/common";
|
|||||||
pageSize,
|
pageSize,
|
||||||
pageLoading,
|
pageLoading,
|
||||||
pageFilters,
|
pageFilters,
|
||||||
|
isMSC,
|
||||||
defaultColDef,
|
defaultColDef,
|
||||||
cellWasClicked,
|
cellWasClicked,
|
||||||
onCreateClickHandle,
|
onCreateClickHandle,
|
||||||
|
|||||||
@@ -296,7 +296,8 @@ export default defineComponent({
|
|||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
let userData : any = ref({
|
let userData : any = ref({
|
||||||
userId:'',
|
userId:'',
|
||||||
userName:''
|
userName:'',
|
||||||
|
section:''
|
||||||
});
|
});
|
||||||
let maxDay = ref(90);
|
let maxDay = ref(90);
|
||||||
let sharerArr : any = ref([]);
|
let sharerArr : any = ref([]);
|
||||||
@@ -618,7 +619,7 @@ export default defineComponent({
|
|||||||
debounce = setTimeout(() => {
|
debounce = setTimeout(() => {
|
||||||
if (
|
if (
|
||||||
sharer != "" &&
|
sharer != "" &&
|
||||||
sharer.playerId.length == 8
|
sharer.playerId.length >4
|
||||||
) {
|
) {
|
||||||
|
|
||||||
let reqParas = { 'playerId': sharer.playerId }
|
let reqParas = { 'playerId': sharer.playerId }
|
||||||
@@ -657,7 +658,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 3000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
@@ -777,6 +778,7 @@ export default defineComponent({
|
|||||||
dataObj.member = memberData.value;
|
dataObj.member = memberData.value;
|
||||||
dataObj.userId = userData.value.userId;
|
dataObj.userId = userData.value.userId;
|
||||||
dataObj.userName = userData.value.userName;
|
dataObj.userName = userData.value.userName;
|
||||||
|
dataObj.userSection = userData.value.section;
|
||||||
dataObj.sectionId = data.value.sectionId;
|
dataObj.sectionId = data.value.sectionId;
|
||||||
if (dataObj.sectionId == null || dataObj.sectionId == undefined) {
|
if (dataObj.sectionId == null || dataObj.sectionId == undefined) {
|
||||||
dataObj.sectionId = userData.value.sectionId;
|
dataObj.sectionId = userData.value.sectionId;
|
||||||
|
|||||||
@@ -593,7 +593,7 @@
|
|||||||
{ headerName:"Check in Date" , field: "checkinDate",sortable: true,unSortIcon: true,minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left"},
|
{ headerName:"Check in Date" , field: "checkinDate",sortable: true,unSortIcon: true,minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left"},
|
||||||
{ headerName:"Check Out Date" , field: "checkoutDate" ,sortable: true,unSortIcon: true,minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left"},
|
{ headerName:"Check Out Date" , field: "checkoutDate" ,sortable: true,unSortIcon: true,minWidth:100, resizable: true, cellClass: "cell-vertical-align-text-left"},
|
||||||
{ headerName:"Continuous / Overlap Booking(C/I to C/O)" , field: "overlapBooking",sortable: true,unSortIcon: true, minWidth:150 , resizable: true,hide:!gamingData, cellClass: "cell-vertical-align-text-left"},
|
{ headerName:"Continuous / Overlap Booking(C/I to C/O)" , field: "overlapBooking",sortable: true,unSortIcon: true, minWidth:150 , resizable: true,hide:!gamingData, cellClass: "cell-vertical-align-text-left"},
|
||||||
{ headerName:"Booker Team" , field: "bookerTeam",sortable: true,unSortIcon: true, minWidth:150 , resizable: true,cellClass: "cell-vertical-align-text-left"},
|
{ headerName:"Booker Team" , field: "sectionName",sortable: true,unSortIcon: true, minWidth:150 , resizable: true,cellClass: "cell-vertical-align-text-left"},
|
||||||
{ headerName:"Booker ID" , field: "createdBy",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, cellClass: "cell-vertical-align-text-left"},
|
{ headerName:"Booker ID" , field: "createdBy",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, cellClass: "cell-vertical-align-text-left"},
|
||||||
{ headerName:"Booker Name" , field: "booker",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, cellClass: "cell-vertical-align-text-left"},
|
{ headerName:"Booker Name" , field: "booker",sortable: true,unSortIcon: true, minWidth:150 , resizable: true, cellClass: "cell-vertical-align-text-left"},
|
||||||
{ headerName:"Sharer" , field: "sharer", minWidth:150 , resizable: true,hide:!isSharer,
|
{ headerName:"Sharer" , field: "sharer", minWidth:150 , resizable: true,hide:!isSharer,
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
headerName: "To",
|
headerName: "To",
|
||||||
field: "changFeTo",
|
field: "changeTo",
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
cellClass: "cell-vertical-align-text-left",
|
cellClass: "cell-vertical-align-text-left",
|
||||||
|
|||||||
@@ -60,12 +60,13 @@
|
|||||||
<!--begin::Input access-->
|
<!--begin::Input access-->
|
||||||
<div class="fv-row mb-1" v-if="accessData.accessRouters!=null">
|
<div class="fv-row mb-1" v-if="accessData.accessRouters!=null">
|
||||||
<el-collapse v-model="activeNames">
|
<el-collapse v-model="activeNames">
|
||||||
<el-collapse-item v-for="rItem in accessData.accessRouters" :title="rItem.name" :name="'access_router_'+rItem.id">
|
<el-collapse-item v-for="rItem in accessData.accessRouters" :key="rItem.routerId" :title="rItem.name" :name="'access_router_'+rItem.routerId">
|
||||||
<div class="custom-tree-container">
|
<div class="custom-tree-container">
|
||||||
<el-tree
|
<el-tree
|
||||||
|
:key="accessTreeRenderKey+'_'+rItem.routerId"
|
||||||
style="max-width: 600px"
|
style="max-width: 600px"
|
||||||
:data="rItem.accessTreeData"
|
:data="rItem.accessTreeData"
|
||||||
:ref="setAccessTreeRef"
|
:ref="(el) => setAccessTreeRef(rItem.routerId, el)"
|
||||||
:default-checked-keys="rItem.selectedKeys"
|
:default-checked-keys="rItem.selectedKeys"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
node-key="id"
|
node-key="id"
|
||||||
@@ -121,7 +122,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getAssetPath } from "@/core/helpers/assets";
|
import { getAssetPath } from "@/core/helpers/assets";
|
||||||
import { defineComponent, ref,computed,onBeforeUpdate } from "vue";
|
import { defineComponent, ref,computed } from "vue";
|
||||||
import { hideModal,showModal } from "@/core/helpers/dom";
|
import { hideModal,showModal } from "@/core/helpers/dom";
|
||||||
import ApiService from "@/core/services/ApiService";
|
import ApiService from "@/core/services/ApiService";
|
||||||
import type { ResponseData } from "@/core/data/AjaxData";
|
import type { ResponseData } from "@/core/data/AjaxData";
|
||||||
@@ -139,7 +140,8 @@ export default defineComponent({
|
|||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
const operateType = ref('CREATE');
|
const operateType = ref('CREATE');
|
||||||
const actionCallback = ref(null);
|
const actionCallback = ref(null);
|
||||||
const accessTreeRefs = ref([]);
|
const accessTreeRefs = ref<Record<string, any>>({});
|
||||||
|
const accessTreeRenderKey = ref(0);
|
||||||
const activeNames = ref([]);
|
const activeNames = ref([]);
|
||||||
const operateTitle = computed(() => {
|
const operateTitle = computed(() => {
|
||||||
let titleLable='Role Access Control - '+(accessData.value && accessData.value.groupName?accessData.value.groupName:'');
|
let titleLable='Role Access Control - '+(accessData.value && accessData.value.groupName?accessData.value.groupName:'');
|
||||||
@@ -159,14 +161,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
return isEditable;
|
return isEditable;
|
||||||
});
|
});
|
||||||
const setAccessTreeRef = (el) => {
|
const setAccessTreeRef = (routerId, el) => {
|
||||||
if (el) {
|
if (el) {
|
||||||
accessTreeRefs.value.push(el);
|
accessTreeRefs.value[String(routerId)] = el;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onBeforeUpdate(() => {
|
|
||||||
accessTreeRefs.value = [];
|
|
||||||
});
|
|
||||||
const getModalOption = () => {
|
const getModalOption = () => {
|
||||||
let opt=('CREATE'===operateType.value || 'EDIT'===operateType.value || 'COPY'===operateType.value)?{backdrop: 'static'}:{};
|
let opt=('CREATE'===operateType.value || 'EDIT'===operateType.value || 'COPY'===operateType.value)?{backdrop: 'static'}:{};
|
||||||
return opt;
|
return opt;
|
||||||
@@ -238,7 +237,7 @@ export default defineComponent({
|
|||||||
accessProperties:[]
|
accessProperties:[]
|
||||||
};
|
};
|
||||||
let treeData = pRouter.accessTreeData;
|
let treeData = pRouter.accessTreeData;
|
||||||
let treeRef = (accessTreeRefs.value && k<accessTreeRefs.value.length?accessTreeRefs.value[k]:null);
|
let treeRef = accessTreeRefs.value[String(pRouter.routerId)] || null;
|
||||||
newRouter.routerId=pRouter.routerId;
|
newRouter.routerId=pRouter.routerId;
|
||||||
if(treeRef && treeData && treeData.length>0){
|
if(treeRef && treeData && treeData.length>0){
|
||||||
const checkedKeys = treeRef!.getCheckedKeys(false);
|
const checkedKeys = treeRef!.getCheckedKeys(false);
|
||||||
@@ -321,7 +320,7 @@ export default defineComponent({
|
|||||||
let res = [];
|
let res = [];
|
||||||
let rSelectKeys=[];
|
let rSelectKeys=[];
|
||||||
if(k==0){
|
if(k==0){
|
||||||
showActiveNames.push('access_router_'+routerItem.id);
|
showActiveNames.push('access_router_'+routerItem.routerId);
|
||||||
}
|
}
|
||||||
if(routerItem.accessProperties && routerItem.accessProperties.length>0){
|
if(routerItem.accessProperties && routerItem.accessProperties.length>0){
|
||||||
for(let i=0;i<routerItem.accessProperties.length;i++){
|
for(let i=0;i<routerItem.accessProperties.length;i++){
|
||||||
@@ -363,6 +362,8 @@ export default defineComponent({
|
|||||||
(resData:ResponseData)=>{
|
(resData:ResponseData)=>{
|
||||||
let result = resData.data;
|
let result = resData.data;
|
||||||
constructAccessTreeByData(result);
|
constructAccessTreeByData(result);
|
||||||
|
accessTreeRefs.value = {};
|
||||||
|
accessTreeRenderKey.value++;
|
||||||
accessData.value=result;
|
accessData.value=result;
|
||||||
showModal(accessModalRef.value,getModalOption());
|
showModal(accessModalRef.value,getModalOption());
|
||||||
},
|
},
|
||||||
@@ -414,6 +415,7 @@ export default defineComponent({
|
|||||||
disabled,
|
disabled,
|
||||||
renderContent,
|
renderContent,
|
||||||
activeNames,
|
activeNames,
|
||||||
|
accessTreeRenderKey,
|
||||||
setAccessTreeRef
|
setAccessTreeRef
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user