Testing the new clientauth api.
This commit is contained in:
parent
7d342213e9
commit
c38389abd4
5 changed files with 9678 additions and 5283 deletions
14932
package-lock.json
generated
14932
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -89,7 +89,11 @@ const endpoints = {
|
||||||
},
|
},
|
||||||
GooglePlaces: {
|
GooglePlaces: {
|
||||||
url: "https://maps.googleapis.com/maps/api/js?key={apiKey}&libraries=places"
|
url: "https://maps.googleapis.com/maps/api/js?key={apiKey}&libraries=places"
|
||||||
}
|
},
|
||||||
|
ValidateClientTag: {
|
||||||
|
url: "/clientauth/api/v1/validateClientTag",
|
||||||
|
method: "GET",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export { endpoints };
|
export { endpoints };
|
||||||
|
|
|
||||||
13
src/helpers/clientauth-helper.js
Normal file
13
src/helpers/clientauth-helper.js
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
import { useMainStore } from '@/store';
|
||||||
|
|
||||||
|
export function validateISSClientTag(clientTag) {
|
||||||
|
const store = useMainStore()
|
||||||
|
const clientName = store.issConfig.clientName;
|
||||||
|
|
||||||
|
const resp = store.validateClientTag(clientTag);
|
||||||
|
|
||||||
|
console.log(resp);
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
@ -148,6 +148,7 @@
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
|
import { validateISSClientTag } from "@/helpers/clientauth-helper";
|
||||||
|
|
||||||
//define validation rules
|
//define validation rules
|
||||||
defineRule("loss-date-required", required(errorMessages.LOSS_DATE_REQUIRED));
|
defineRule("loss-date-required", required(errorMessages.LOSS_DATE_REQUIRED));
|
||||||
|
|
@ -184,6 +185,8 @@
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const mainStore = useMainStore();
|
const mainStore = useMainStore();
|
||||||
|
|
||||||
|
const resp = validateISSClientTag("asdf");
|
||||||
return { mainStore };
|
return { mainStore };
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next)
|
async beforeRouteEnter(to, from, next)
|
||||||
|
|
|
||||||
|
|
@ -893,6 +893,13 @@ export const useMainStore = defineStore({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
validateClientTag({ clientTag }) {
|
||||||
|
return globalMethods.callHttpClient({
|
||||||
|
methods: endpoints.ValidateClientTag.method,
|
||||||
|
endpoint: `${endpoints.ValidateClientTag.url}/${"asdf"}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
saveServiceLocation(serviceLocationInfo) {
|
saveServiceLocation(serviceLocationInfo) {
|
||||||
this.updateServiceLocation(serviceLocationInfo);
|
this.updateServiceLocation(serviceLocationInfo);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue