Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #1493

Merged
merged 3 commits into from
Jul 22, 2022
Merged

Develop #1493

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/participant/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,16 @@ export default {
},
},
methods: {
checkIfUserHasLoggedIn() {
checkIfUserHasLoggedIn(e) {
if (!this.userProfile) {
// TODO: bad way of coding. We should only hide which is being clicked
document.querySelectorAll(".card-header").forEach(elm => {
elm.classList.add('collapsed')
elm.attributes['aria-expanded'].value = false;
document.getElementById(elm.attributes['aria-controls'].value).style.display = 'none';
const elemTohide = elm.nextSibling
if (elemTohide){
elemTohide.style.display = 'none';
}
})
return this.notifyErr(Messsages.EVENT_ACTIONS.UNAUTHENTICATED);
}
Expand All @@ -197,7 +200,7 @@ export default {
if (!this.authToken){
return;
}

this.isLoading = true;
this.actions = [];

Expand Down
1 change: 0 additions & 1 deletion src/components/participant/ActionInputs/InputNumber.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ computed:{
methods: {
update() {
if (!this.data.value) {
this.data.value = Number;
return this.notifyErr(Messages.EVENT_ACTIONS.INVALID_INPUT);
} else {
this.$emit('input', this.data.value)
Expand Down
26 changes: 13 additions & 13 deletions src/components/participant/ActionInputs/SumsubKyc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,11 @@ computed:{
async mounted() {
this.$root.$on('bv::collapse::state', (collapseId, isJustShown) => {
if(collapseId.includes('KYC') && isJustShown){
this.dropDown()
this.dropDown()
}
eventBus.$on(`disableInput${this.data._id}`, this.disableInput);

})


},

eventBus.$on(`disableInput${this.data._id}`, this.disableInput);
})
},
methods:{
async update(){
try{
Expand All @@ -151,14 +147,15 @@ methods:{
},
async dropDown(){
if(!this.done){
const data= await this.getNewAccessToken()

this.launchWebSdk(data.token)
const data = await this.getNewAccessToken()
if(data){
this.launchWebSdk(data.token)
}
}
},
async refreshToken(){
const data= await this.getNewAccessToken()
return data.token
const data = await this.getNewAccessToken()
return data? data.token : null
}
,
launchWebSdk(accessToken/*, applicantEmail, applicantPhone, customI18nMessages*/) {
Expand Down Expand Up @@ -227,6 +224,9 @@ methods:{
},

async getNewAccessToken() {
if (!this.authToken) {
return;
}
let url = `${this.$config.studioServer.BASE_URL}api/v1/sumsub/kyc/accesstoken`;
let headers = {
"Content-Type": "application/json",
Expand Down