Merge branch 'main' of https://freeleaps.com:3443/products/freeleaps into main
* 'main' of https://freeleaps.com:3443/products/freeleaps: More changes on axios feat: commit、issue图表修改 feat: commit、issue图表 .gitignore Remove content-type as it causes the failure of formdata pass Update the format Fix the null issue for refresh and access token Enable refresh_token when it's about to expire(5 minutes) Change for showing the attachment for issues Test passed for local zoom call making Fix a few bugs, more translation
This commit is contained in:
commit
4d0d5d3884
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ ythe.sh
|
|||||||
*build*
|
*build*
|
||||||
package-lock.json
|
package-lock.json
|
||||||
.vite
|
.vite
|
||||||
|
.idea
|
||||||
|
|||||||
@ -2,6 +2,10 @@
|
|||||||
FROM node:lts-alpine as build-stage
|
FROM node:lts-alpine as build-stage
|
||||||
ARG CONTAINER_APP_ROOT="/app"
|
ARG CONTAINER_APP_ROOT="/app"
|
||||||
ARG FRONTEND_PORT=8080
|
ARG FRONTEND_PORT=8080
|
||||||
|
# TODO: further testing before turning on
|
||||||
|
# ARG ZOOM_CLIENT_ID
|
||||||
|
# ARG ZOOM_REDIRECT_URI
|
||||||
|
# ARG ZOOM_SCOPE
|
||||||
RUN npm update npm -g
|
RUN npm update npm -g
|
||||||
RUN npm config set "@fortawesome:registry" https://npm.fontawesome.com/
|
RUN npm config set "@fortawesome:registry" https://npm.fontawesome.com/
|
||||||
RUN npm config set "//npm.fontawesome.com/:_authToken" 58624E90-2685-43C6-BF0F-0BFECCE11CD2
|
RUN npm config set "//npm.fontawesome.com/:_authToken" 58624E90-2685-43C6-BF0F-0BFECCE11CD2
|
||||||
@ -17,6 +21,11 @@ COPY frontend/*.html ./
|
|||||||
COPY frontend/src ./src
|
COPY frontend/src ./src
|
||||||
COPY frontend/public ./public
|
COPY frontend/public ./public
|
||||||
|
|
||||||
|
# TODO: further testing before turning on
|
||||||
|
# RUN echo "VUE_APP_ZOOM_CLIENT_ID=${ZOOM_CLIENT_ID}" >> .env
|
||||||
|
# RUN echo "VUE_APP_ZOOM_REDIRECT_URI=${ZOOM_REDIRECT_URI}" >> .env
|
||||||
|
# RUN echo "VUE_APP_ZOOM_SCOPE=${ZOOM_SCOPE}" >> .env
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# production stage
|
# production stage
|
||||||
|
|||||||
1
frontend/frontend
Symbolic link
1
frontend/frontend
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../freeleaps2-frontend/frontend
|
||||||
@ -19,6 +19,7 @@
|
|||||||
"echarts": "^5.5.1",
|
"echarts": "^5.5.1",
|
||||||
"graphql": "^16.9.0",
|
"graphql": "^16.9.0",
|
||||||
"graphql-tag": "^2.12.6",
|
"graphql-tag": "^2.12.6",
|
||||||
|
"jwt-decode": "^4.0.0",
|
||||||
"pdfjs-dist": "^4.3.136",
|
"pdfjs-dist": "^4.3.136",
|
||||||
"pinia": "^2.1.6",
|
"pinia": "^2.1.6",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
|
|||||||
72
frontend/src/components/CustomChart.vue
Normal file
72
frontend/src/components/CustomChart.vue
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<v-chart ref="customChart" :option="option" autoresize />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { use } from 'echarts/core'
|
||||||
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
import { LineChart, BarChart } from 'echarts/charts'
|
||||||
|
import { GridComponent, LegendComponent, TooltipComponent, DataZoomComponent } from 'echarts/components'
|
||||||
|
import VChart from 'vue-echarts'
|
||||||
|
use([CanvasRenderer, LineChart, LegendComponent, GridComponent, TooltipComponent, BarChart, DataZoomComponent])
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CustomChart',
|
||||||
|
props: {
|
||||||
|
customOption: { type: Object, default: () => {} }
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
VChart,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
option() {
|
||||||
|
if (this.customOption) {
|
||||||
|
const option = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
textStyle: {
|
||||||
|
align: 'left'
|
||||||
|
},
|
||||||
|
...this.customOption?.tooltip
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: this.customOption.series.map(ser => ser.name) || [],
|
||||||
|
...this.customOption?.legend
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
axisLabel: {
|
||||||
|
showMaxLabel: true,
|
||||||
|
showMinLabel: true
|
||||||
|
},
|
||||||
|
boundaryGap: false,
|
||||||
|
...this.customOption?.xAxis
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
...this.customOption?.yAxis
|
||||||
|
},
|
||||||
|
dataZoom: [{
|
||||||
|
type: 'slider',
|
||||||
|
startValue: 0,
|
||||||
|
endValue: 3,
|
||||||
|
show: this.customOption?.xAxis?.data?.length > 4
|
||||||
|
}],
|
||||||
|
series: this.customOption.series || [],
|
||||||
|
}
|
||||||
|
return option
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
// 手动销毁实例
|
||||||
|
if (this.$refs.customChart && this.$refs.customChart.dispose) {
|
||||||
|
this.$refs.customChart.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="loading || empty" class="empty-content-container" :class="{ autoFit: 'auto-fit' }">
|
<div v-if="loading || empty" class="empty-content-container" :class="{ autoFit: 'auto-fit' }">
|
||||||
<img v-if="loading" src="@/assets/images/loading.gif" class="loading-big" alt="">
|
<img v-if="loading" src="@/assets/images/loading.gif" class="loading-big" alt="" />
|
||||||
<img v-if="empty && !loading" src="@/assets/images/no_content.jpg" class="empty-img" alt="">
|
<img v-if="empty && !loading" src="@/assets/images/no_content.jpg" class="empty-img" alt="" />
|
||||||
<span v-if="empty && !loading" class="empty-text">{{ $t('No content yet') }}</span>
|
<span v-if="empty && !loading" class="empty-text">{{ $t('No content yet') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -34,11 +34,13 @@ export default {
|
|||||||
width: 188px;
|
width: 188px;
|
||||||
height: 188px;
|
height: 188px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-img {
|
.empty-img {
|
||||||
width: 188px;
|
width: 188px;
|
||||||
height: 188px;
|
height: 188px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-text {
|
.empty-text {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
color: #6e7387;
|
color: #6e7387;
|
||||||
|
|||||||
58
frontend/src/components/LineChart.vue
Normal file
58
frontend/src/components/LineChart.vue
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<v-chart ref="lineChart" :option="option" autoresize />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { use } from 'echarts/core'
|
||||||
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
import { LineChart } from 'echarts/charts'
|
||||||
|
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
|
||||||
|
import VChart from 'vue-echarts'
|
||||||
|
use([CanvasRenderer, LineChart, LegendComponent, GridComponent, TooltipComponent])
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'LineChart',
|
||||||
|
props: {
|
||||||
|
data: { type: Object, default: () => {} }
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
VChart,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
option() {
|
||||||
|
const option = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: this.data.series.map(ser => ser.name) || []
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: this.data.xData || [],
|
||||||
|
axisLabel: {
|
||||||
|
showMaxLabel: true,
|
||||||
|
showMinLabel: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
minInterval: 1
|
||||||
|
},
|
||||||
|
series: this.data.series || []
|
||||||
|
}
|
||||||
|
return option
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
// 手动销毁实例
|
||||||
|
if (this.$refs.lineChart && this.$refs.lineChart.dispose) {
|
||||||
|
this.$refs.lineChart.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
@ -2,38 +2,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="header-container">
|
<div class="header-container">
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
<div class="information-bar" @click="gotoMessages"
|
<div
|
||||||
:class="{ active: activePath == 'message', unread: unreadConversationCount > 0 }">
|
class="information-bar"
|
||||||
|
@click="gotoMessages"
|
||||||
|
:class="{ active: activePath == 'message', unread: unreadConversationCount > 0 }"
|
||||||
|
>
|
||||||
<img alt="freeleaps message" src="@/assets/message.png" />
|
<img alt="freeleaps message" src="@/assets/message.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation-container" role="navigation">
|
<div class="navigation-container" role="navigation">
|
||||||
<button class="navigation-item" @click="gotoWorkspace"
|
<button
|
||||||
:class="{ active: activePath == 'Workspace', badge: unreadWorkspace }">
|
class="navigation-item"
|
||||||
|
@click="gotoWorkspace"
|
||||||
|
:class="{ active: activePath == 'Workspace', badge: unreadWorkspace }"
|
||||||
|
>
|
||||||
<svg-icon icon="workspace" class-name="icon" />
|
<svg-icon icon="workspace" class-name="icon" />
|
||||||
{{ $t('My Work') }}
|
{{ $t('My Work') }}
|
||||||
<div v-if="unreadWorkspace" class="navigation-item-tip">
|
<div v-if="unreadWorkspace" class="navigation-item-tip">
|
||||||
{{ $t('Some update in your work') }}
|
{{ $t('Some update in your work') }}
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="navigation-item" @click="gotoRequests"
|
<button
|
||||||
:class="{ active: activePath == 'Requests', badge: unreadRequest }">
|
class="navigation-item"
|
||||||
|
@click="gotoRequests"
|
||||||
|
:class="{ active: activePath == 'Requests', badge: unreadRequest }"
|
||||||
|
>
|
||||||
<svg-icon icon="requests" class-name="icon" />
|
<svg-icon icon="requests" class-name="icon" />
|
||||||
{{ $t('Jobs') }}
|
{{ $t('Jobs') }}
|
||||||
<div v-if="unreadRequest" class="navigation-item-tip">
|
<div v-if="unreadRequest" class="navigation-item-tip">
|
||||||
{{ $t('Some update in your request') }}
|
{{ $t('Some update in your request') }}
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="navigation-item" @click="gotoProviders" :class="activePath == 'Providers' ? 'active' : ''">
|
<button
|
||||||
|
class="navigation-item"
|
||||||
|
@click="gotoProviders"
|
||||||
|
:class="activePath == 'Providers' ? 'active' : ''"
|
||||||
|
>
|
||||||
<svg-icon icon="providers" class-name="icon" />
|
<svg-icon icon="providers" class-name="icon" />
|
||||||
{{ $t('Workers') }}
|
{{ $t('Workers') }}
|
||||||
</button>
|
</button>
|
||||||
<button class="navigation-item" @click="gotoIssueRequest" :class="activePath == 'Post' ? 'active' : ''">
|
<button
|
||||||
|
class="navigation-item"
|
||||||
|
@click="gotoIssueRequest"
|
||||||
|
:class="activePath == 'Post' ? 'active' : ''"
|
||||||
|
>
|
||||||
<svg-icon icon="post" class-name="icon" />
|
<svg-icon icon="post" class-name="icon" />
|
||||||
{{ $t('Post a Job') }}
|
{{ $t('Post a Job') }}
|
||||||
</button>
|
</button>
|
||||||
<div class="form-check form-switch header-switch-container" @click="gotoProfile">
|
<div class="form-check form-switch header-switch-container" @click="gotoProfile">
|
||||||
<input class="form-check-input" type="checkbox" role="switch"
|
<input
|
||||||
:checked="userProfile?.account?.provider?.accepting_request" id="personal-earning-now-checkbox" disabled />
|
class="form-check-input"
|
||||||
|
type="checkbox"
|
||||||
|
role="switch"
|
||||||
|
:checked="userProfile?.account?.provider?.accepting_request"
|
||||||
|
id="personal-earning-now-checkbox"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
<label class="form-check-label" for="personal-earning-now-checkbox">
|
<label class="form-check-label" for="personal-earning-now-checkbox">
|
||||||
<span>{{ $t('Providing service') }}</span>
|
<span>{{ $t('Providing service') }}</span>
|
||||||
</label>
|
</label>
|
||||||
@ -44,10 +67,17 @@
|
|||||||
<laguage-switch class="laguage-switch" />
|
<laguage-switch class="laguage-switch" />
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-container">
|
<div class="profile-container">
|
||||||
<img alt="freeleaps logo" data-bs-toggle="dropdown" aria-expanded="false" id="accountButton" :src="userProfile?.account?.basic?.photo?.base64
|
<img
|
||||||
|
alt="freeleaps logo"
|
||||||
|
data-bs-toggle="dropdown"
|
||||||
|
aria-expanded="false"
|
||||||
|
id="accountButton"
|
||||||
|
:src="
|
||||||
|
userProfile?.account?.basic?.photo?.base64
|
||||||
? userProfile?.account?.basic?.photo?.base64
|
? userProfile?.account?.basic?.photo?.base64
|
||||||
: profileUrl
|
: profileUrl
|
||||||
" />
|
"
|
||||||
|
/>
|
||||||
<ul class="dropdown-menu" aria-labelledby="accountButton">
|
<ul class="dropdown-menu" aria-labelledby="accountButton">
|
||||||
<li>
|
<li>
|
||||||
<button class="account-menu-button" @click="gotoProfile">{{ $t('Profile') }}</button>
|
<button class="account-menu-button" @click="gotoProfile">{{ $t('Profile') }}</button>
|
||||||
|
|||||||
@ -215,8 +215,10 @@ export default {
|
|||||||
Goal: 'Goal',
|
Goal: 'Goal',
|
||||||
Message: 'Message',
|
Message: 'Message',
|
||||||
'Upload attachment': 'Upload attachment',
|
'Upload attachment': 'Upload attachment',
|
||||||
'Didn\'t get the email? Check junk folder or': 'Didn\'t get the email? Check junk folder or ',
|
"Didn't get the email? Check junk folder or": "Didn't get the email? Check junk folder or ",
|
||||||
'send again': 'send again',
|
'send again': 'send again',
|
||||||
'No content yet': 'No content yet'
|
'No content yet': 'No content yet',
|
||||||
|
'open': 'open',
|
||||||
|
'resolved': 'resolved',
|
||||||
|
'unresolved': 'unresolved'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -213,7 +213,20 @@ export default {
|
|||||||
'Lines of code per week': '每周代码产量',
|
'Lines of code per week': '每周代码产量',
|
||||||
Message: '消息',
|
Message: '消息',
|
||||||
'Upload attachment': '上传附件',
|
'Upload attachment': '上传附件',
|
||||||
'Didn\'t get the email? Check junk folder or': '没收到邮件?检查垃圾文件夹或',
|
"Didn't get the email? Check junk folder or": '没收到邮件?检查垃圾文件夹或',
|
||||||
'send again': '重新发送',
|
'send again': '重新发送',
|
||||||
'No content yet': '暂无内容'
|
'No content yet': '暂无内容',
|
||||||
|
OUTSTANDING: '进行中',
|
||||||
|
PAID: '已付款',
|
||||||
|
DONE: '已完成',
|
||||||
|
RECRUITING: '招人中',
|
||||||
|
ONGOING: '进行中',
|
||||||
|
PENDING: '待确认',
|
||||||
|
CLOSED: '已关闭',
|
||||||
|
REJECTED: '已拒绝',
|
||||||
|
APPLYING: '申请中',
|
||||||
|
ACCEPTING: '接受中',
|
||||||
|
'open': '未解决',
|
||||||
|
'resolved': '已解决',
|
||||||
|
'unresolved': '未解决总计'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,13 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group-container">
|
<div class="input-group-container">
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
<input class="input-email" id="inputEmail" type="text" placeholder="name@example.com" v-model="email" />
|
<input
|
||||||
|
class="input-email"
|
||||||
|
id="inputEmail"
|
||||||
|
type="text"
|
||||||
|
placeholder="name@example.com"
|
||||||
|
v-model="email"
|
||||||
|
/>
|
||||||
<label for="inputEmail">{{ $t('Enter email address to start') }}</label>
|
<label for="inputEmail">{{ $t('Enter email address to start') }}</label>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn-start" ref="submitButton" @click="trySigninWithEmail()">
|
<button class="btn-start" ref="submitButton" @click="trySigninWithEmail()">
|
||||||
@ -51,6 +57,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
trySigninWithEmail() {
|
trySigninWithEmail() {
|
||||||
|
// Prevent the page from refreshing on form submission
|
||||||
|
event.preventDefault()
|
||||||
this.message = null
|
this.message = null
|
||||||
if (this.email === null || this.email.length < 1) {
|
if (this.email === null || this.email.length < 1) {
|
||||||
this.message = this.$t('Please type in your email')
|
this.message = this.$t('Please type in your email')
|
||||||
|
|||||||
@ -9,8 +9,14 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group-container">
|
<div class="input-group-container">
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
<input class="input-email" id="inputCode" type="text" :placeholder="'Code sent to your email'"
|
<input
|
||||||
v-model="code" @focus="inputFocus" />
|
class="input-email"
|
||||||
|
id="inputCode"
|
||||||
|
type="text"
|
||||||
|
:placeholder="'Code sent to your email'"
|
||||||
|
v-model="code"
|
||||||
|
@focus="inputFocus"
|
||||||
|
/>
|
||||||
<label for="inputCode">{{ $t('Authenticaion Code Sent To Your Email') }}</label>
|
<label for="inputCode">{{ $t('Authenticaion Code Sent To Your Email') }}</label>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn-start">{{ $t('SIGN IN') }}</button>
|
<button type="submit" class="btn-start">{{ $t('SIGN IN') }}</button>
|
||||||
@ -18,9 +24,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="error-msg" v-if="message != null">{{ message }}</p>
|
<p class="error-msg" v-if="message != null">{{ message }}</p>
|
||||||
<p class="error-msg msg-center" v-if="!message">
|
<p class="error-msg msg-center" v-if="!message">
|
||||||
<span>{{ $t('Didn\'t get the email? Check junk folder or') }}</span>
|
<span>{{ $t("Didn't get the email? Check junk folder or") }}</span>
|
||||||
<button class="btn btn-link resend-btn" :disabled="countdown !== 0" type="button"
|
<button
|
||||||
@click="trySigninWithEmail">{{ $t('send again') }}</button>
|
class="btn btn-link resend-btn"
|
||||||
|
:disabled="countdown !== 0"
|
||||||
|
type="button"
|
||||||
|
@click="trySigninWithEmail"
|
||||||
|
>
|
||||||
|
{{ $t('send again') }}
|
||||||
|
</button>
|
||||||
<span v-if="countdown !== 0" class="countdown">({{ countdown }})</span>
|
<span v-if="countdown !== 0" class="countdown">({{ countdown }})</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -78,6 +78,14 @@ export default {
|
|||||||
|
|
||||||
UserAuthApi.signinByEmail(this.email, this.password)
|
UserAuthApi.signinByEmail(this.email, this.password)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
// Extract the necessary data from the response
|
||||||
|
const { access_token, refresh_token, expires_in } = response.data
|
||||||
|
|
||||||
|
// Save tokens and expiration time in localStorage
|
||||||
|
localStorage.setItem('access_token', access_token)
|
||||||
|
localStorage.setItem('refresh_token', refresh_token)
|
||||||
|
localStorage.setItem('expires_in', expires_in)
|
||||||
|
|
||||||
let signinAction = response.data.signin_result
|
let signinAction = response.data.signin_result
|
||||||
switch (signinAction) {
|
switch (signinAction) {
|
||||||
case signinActionEnum.EXISTING_USER_PASSWORD_REQUIRED:
|
case signinActionEnum.EXISTING_USER_PASSWORD_REQUIRED:
|
||||||
|
|||||||
@ -33,10 +33,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
view_link(directory) {
|
view_link(directory) {
|
||||||
if (directory.content_id)
|
if (directory.content_id) this.mnx_navToPdfContentViewer(directory.content_id)
|
||||||
this.mnx_navToPdfContentViewer(directory.content_id)
|
else if (directory.content_link) this.mnx_navToLinkContentViewer(btoa(directory.content_link))
|
||||||
else if (directory.content_link)
|
|
||||||
this.mnx_navToLinkContentViewer(btoa(directory.content_link))
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -87,6 +85,7 @@ export default {
|
|||||||
color: #666666;
|
color: #666666;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.directory-btn {
|
.directory-btn {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,10 +32,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
view_blog(blog) {
|
view_blog(blog) {
|
||||||
if (blog.content_id)
|
if (blog.content_id) this.mnx_navToPdfContentViewer(blog.content_id)
|
||||||
this.mnx_navToPdfContentViewer(blog.content_id)
|
else if (blog.content_link) this.mnx_navToLinkContentViewer(btoa(blog.content_link))
|
||||||
else if (blog.content_link)
|
|
||||||
this.mnx_navToLinkContentViewer(btoa(blog.content_link))
|
|
||||||
},
|
},
|
||||||
retrieve_summary(blog) {
|
retrieve_summary(blog) {
|
||||||
return blog.summary_text
|
return blog.summary_text
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="career_containter">
|
<div class="career_containter">
|
||||||
<div class="career-item" v-for="(directory, index) in directories" :key="index" @click="view_link(directory)">
|
<div
|
||||||
|
class="career-item"
|
||||||
|
v-for="(directory, index) in directories"
|
||||||
|
:key="index"
|
||||||
|
@click="view_link(directory)"
|
||||||
|
>
|
||||||
<p class="career-title">
|
<p class="career-title">
|
||||||
{{ directory.title_text }}
|
{{ directory.title_text }}
|
||||||
</p>
|
</p>
|
||||||
@ -28,10 +33,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
view_link(directory) {
|
view_link(directory) {
|
||||||
if (directory.content_id)
|
if (directory.content_id) this.mnx_navToPdfContentViewer(directory.content_id)
|
||||||
this.mnx_navToPdfContentViewer(directory.content_id)
|
else if (directory.content_link) this.mnx_navToLinkContentViewer(btoa(directory.content_link))
|
||||||
else if (directory.content_link)
|
|
||||||
this.mnx_navToLinkContentViewer(btoa(directory.content_link))
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@ -7,8 +7,13 @@
|
|||||||
<span v-if="accountNeedAttention">!</span>
|
<span v-if="accountNeedAttention">!</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-content-container" id="account-summary">
|
<div class="panel-content-container" id="account-summary">
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-user-id"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-user-id">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-user-id"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-user-id"
|
||||||
|
>
|
||||||
<div class="profile-item-container">
|
<div class="profile-item-container">
|
||||||
<label class="profile-item-label" for="account-summary-user-id">{{
|
<label class="profile-item-label" for="account-summary-user-id">{{
|
||||||
$t('User ID')
|
$t('User ID')
|
||||||
@ -18,8 +23,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-password"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-password">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-password"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-password"
|
||||||
|
>
|
||||||
<div class="profile-item-container">
|
<div class="profile-item-container">
|
||||||
<label class="profile-item-label" for="account-summary-password">{{
|
<label class="profile-item-label" for="account-summary-password">{{
|
||||||
$t('Password')
|
$t('Password')
|
||||||
@ -27,8 +37,13 @@
|
|||||||
<span class="profile-item-span" id="account-summary-password"> ******** </span>
|
<span class="profile-item-span" id="account-summary-password"> ******** </span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-user-email"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-user-email">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-user-email"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-user-email"
|
||||||
|
>
|
||||||
<div class="profile-item-container">
|
<div class="profile-item-container">
|
||||||
<label class="profile-item-label" for="account-summary-email">{{
|
<label class="profile-item-label" for="account-summary-email">{{
|
||||||
$t('Email')
|
$t('Email')
|
||||||
@ -38,8 +53,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-user-mobile"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-user-mobile">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-user-mobile"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-user-mobile"
|
||||||
|
>
|
||||||
<div class="profile-item-container">
|
<div class="profile-item-container">
|
||||||
<label class="profile-item-label" for="account-summary-mobile">{{
|
<label class="profile-item-label" for="account-summary-mobile">{{
|
||||||
$t('Mobile')
|
$t('Mobile')
|
||||||
@ -51,29 +71,61 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapse-content-container" id="collapse-user-id" aria-labelledby="account-summary"
|
<div
|
||||||
data-bs-parent="#account-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-user-id"
|
||||||
|
aria-labelledby="account-summary"
|
||||||
|
data-bs-parent="#account-panel"
|
||||||
|
>
|
||||||
<div class="collapse-item-container">
|
<div class="collapse-item-container">
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input type="text" v-model="userProfile.account.basic.FLID.identity" readonly="true" v-tooltip
|
<input
|
||||||
title="Generated automatically" delay='{"show":"500", "hide":"100"}' />
|
type="text"
|
||||||
|
v-model="userProfile.account.basic.FLID.identity"
|
||||||
|
readonly="true"
|
||||||
|
v-tooltip
|
||||||
|
title="Generated automatically"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapse-content-container" id="collapse-password" aria-labelledby="account-summary"
|
<div
|
||||||
data-bs-parent="#account-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-password"
|
||||||
|
aria-labelledby="account-summary"
|
||||||
|
data-bs-parent="#account-panel"
|
||||||
|
>
|
||||||
<div class="collapse-item-container">
|
<div class="collapse-item-container">
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input type="password" v-model="passwordOperation.password" :placeholder="passwordOperation.placeholder"
|
<input
|
||||||
readonly="true" v-tooltip title="Click to edit" delay='{"show":"500", "hide":"100"}'
|
type="password"
|
||||||
@click="edittingPassword($event)" @blur="stopEdittingPassword($event)" @keyup.enter="blurInput($event)" />
|
v-model="passwordOperation.password"
|
||||||
|
:placeholder="passwordOperation.placeholder"
|
||||||
|
readonly="true"
|
||||||
|
v-tooltip
|
||||||
|
title="Click to edit"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
@click="edittingPassword($event)"
|
||||||
|
@blur="stopEdittingPassword($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
/>
|
||||||
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input type="password" v-model="passwordOperation.password2" :placeholder="passwordOperation.placeholder2"
|
<input
|
||||||
readonly=" true" v-tooltip title="Click to edit" delay='{"show":"500", "hide":"100"}'
|
type="password"
|
||||||
@click="edittingPassword2($event)" @blur="stopEdittingPassword2($event)" @keyup.enter="blurInput($event)"
|
v-model="passwordOperation.password2"
|
||||||
ref="password2Input" />
|
:placeholder="passwordOperation.placeholder2"
|
||||||
|
readonly=" true"
|
||||||
|
v-tooltip
|
||||||
|
title="Click to edit"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
@click="edittingPassword2($event)"
|
||||||
|
@blur="stopEdittingPassword2($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
ref="password2Input"
|
||||||
|
/>
|
||||||
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
||||||
<p v-if="passwordOperation.message" class="error-message">
|
<p v-if="passwordOperation.message" class="error-message">
|
||||||
{{ passwordOperation.message }}
|
{{ passwordOperation.message }}
|
||||||
@ -81,51 +133,104 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapse-content-container" id="collapse-user-email" aria-labelledby="account-summary"
|
<div
|
||||||
data-bs-parent="#account-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-user-email"
|
||||||
|
aria-labelledby="account-summary"
|
||||||
|
data-bs-parent="#account-panel"
|
||||||
|
>
|
||||||
<div class="collapse-item-container">
|
<div class="collapse-item-container">
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input type="text" v-model="emailOperation.email.address" readonly="true" v-tooltip title="Click to update"
|
<input
|
||||||
delay='{"show":"500", "hide":"100"}' @click="edittingEmail($event)" @blur="stopEdittingEmail($event)"
|
type="text"
|
||||||
@keyup.enter="blurInput($event)" />
|
v-model="emailOperation.email.address"
|
||||||
|
readonly="true"
|
||||||
|
v-tooltip
|
||||||
|
title="Click to update"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
@click="edittingEmail($event)"
|
||||||
|
@blur="stopEdittingEmail($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="emailOperation.verifyingMode" class="collapse-item-input">
|
<div v-if="emailOperation.verifyingMode" class="collapse-item-input">
|
||||||
<input type="text" v-model="emailOperation.verificationCode" placeholder="verification code" v-tooltip
|
<input
|
||||||
title="Put the verification code received in the email" delay='{"show":"500", "hide":"100"}'
|
type="text"
|
||||||
@blur="stopEdittingEmailVerificationCode($event)" @keyup.enter="blurInput($event)" />
|
v-model="emailOperation.verificationCode"
|
||||||
|
placeholder="verification code"
|
||||||
|
v-tooltip
|
||||||
|
title="Put the verification code received in the email"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
@blur="stopEdittingEmailVerificationCode($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
/>
|
||||||
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
||||||
<p v-if="emailOperation.message" class="error-message">{{ emailOperation.message }}</p>
|
<p v-if="emailOperation.message" class="error-message">{{ emailOperation.message }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button v-if="!emailOperation.verifyingMode" class="btn btn-link" :disabled="emailOperation.email.verified"
|
<button
|
||||||
@click="startVerifyingEmail()" v-tooltip :title="emailOperation.email.verified
|
v-if="!emailOperation.verifyingMode"
|
||||||
|
class="btn btn-link"
|
||||||
|
:disabled="emailOperation.email.verified"
|
||||||
|
@click="startVerifyingEmail()"
|
||||||
|
v-tooltip
|
||||||
|
:title="
|
||||||
|
emailOperation.email.verified
|
||||||
? 'The email has been verified'
|
? 'The email has been verified'
|
||||||
: 'The email needs to be verify'
|
: 'The email needs to be verify'
|
||||||
" delay='{"show":"500", "hide":"100"}'>
|
"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
>
|
||||||
{{ emailOperation.email.verified ? 'Verified' : 'Verify' }}
|
{{ emailOperation.email.verified ? 'Verified' : 'Verify' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapse-content-container" id="collapse-user-mobile" aria-labelledby="account-summary"
|
<div
|
||||||
data-bs-parent="#account-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-user-mobile"
|
||||||
|
aria-labelledby="account-summary"
|
||||||
|
data-bs-parent="#account-panel"
|
||||||
|
>
|
||||||
<div class="collapse-item-container">
|
<div class="collapse-item-container">
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input type="text" v-model="mobileOperation.mobile.number" readonly="true" v-tooltip
|
<input
|
||||||
|
type="text"
|
||||||
|
v-model="mobileOperation.mobile.number"
|
||||||
|
readonly="true"
|
||||||
|
v-tooltip
|
||||||
title="Click to update, be sure to prepend country code, i.e. +86 for China"
|
title="Click to update, be sure to prepend country code, i.e. +86 for China"
|
||||||
@click="edittingMobile($event)" @blur="stopEdittingMobile($event)" @keyup.enter="blurInput($event)" />
|
@click="edittingMobile($event)"
|
||||||
|
@blur="stopEdittingMobile($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="mobileOperation.verifyingMode" class="collapse-item-input">
|
<div v-if="mobileOperation.verifyingMode" class="collapse-item-input">
|
||||||
<input type="text" v-model="mobileOperation.verificationCode" placeholder="verification code" v-tooltip
|
<input
|
||||||
title="Put the verification code received in the mobile number" delay='{"show":"500", "hide":"100"}'
|
type="text"
|
||||||
@blur="stopEdittingMobileVerificationCode($event)" @keyup.enter="blurInput($event)" />
|
v-model="mobileOperation.verificationCode"
|
||||||
|
placeholder="verification code"
|
||||||
|
v-tooltip
|
||||||
|
title="Put the verification code received in the mobile number"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
@blur="stopEdittingMobileVerificationCode($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
/>
|
||||||
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
<svg-icon icon="msg-enter" class-name="enter-icon" />
|
||||||
<p v-if="mobileOperation.message" class="error-input">{{ mobileOperation.message }}</p>
|
<p v-if="mobileOperation.message" class="error-input">{{ mobileOperation.message }}</p>
|
||||||
</div>
|
</div>
|
||||||
<button v-if="!mobileOperation.verifyingMode" class="btn btn-link" :disabled="mobileOperation.mobile.verified"
|
<button
|
||||||
@click="startVerifyingMobile()" v-tooltip :title="mobileOperation.mobile.verified
|
v-if="!mobileOperation.verifyingMode"
|
||||||
|
class="btn btn-link"
|
||||||
|
:disabled="mobileOperation.mobile.verified"
|
||||||
|
@click="startVerifyingMobile()"
|
||||||
|
v-tooltip
|
||||||
|
:title="
|
||||||
|
mobileOperation.mobile.verified
|
||||||
? 'The mobile number has been verified'
|
? 'The mobile number has been verified'
|
||||||
: 'The mobile number needs to be verify'
|
: 'The mobile number needs to be verify'
|
||||||
" delay='{"show":"500", "hide":"100"}'>
|
"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
>
|
||||||
{{ mobileOperation.mobile.verified ? 'Verified' : 'Verify' }}
|
{{ mobileOperation.mobile.verified ? 'Verified' : 'Verify' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -137,8 +242,13 @@
|
|||||||
<label for="personal-summary">{{ $t('Personal') }}</label>
|
<label for="personal-summary">{{ $t('Personal') }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-content-container" id="personal-summary">
|
<div class="panel-content-container" id="personal-summary">
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-user-identity"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-user-identity">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-user-identity"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-user-identity"
|
||||||
|
>
|
||||||
<div class="profile-item-container">
|
<div class="profile-item-container">
|
||||||
<label class="profile-item-label" for="account-summary-user-fullname">{{
|
<label class="profile-item-label" for="account-summary-user-fullname">{{
|
||||||
$t('Full name')
|
$t('Full name')
|
||||||
@ -149,20 +259,36 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-personal-user-photo"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-personal-user-photo">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-personal-user-photo"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-personal-user-photo"
|
||||||
|
>
|
||||||
<div class="profile-item-container profile-photo-container">
|
<div class="profile-item-container profile-photo-container">
|
||||||
<img class="profile-photo" alt="user portrait" id="personal-photo-operation-image" :src="userProfile.account.basic.photo.base64
|
<img
|
||||||
|
class="profile-photo"
|
||||||
|
alt="user portrait"
|
||||||
|
id="personal-photo-operation-image"
|
||||||
|
:src="
|
||||||
|
userProfile.account.basic.photo.base64
|
||||||
? userProfile.account.basic.photo.base64
|
? userProfile.account.basic.photo.base64
|
||||||
: profileUrl
|
: profileUrl
|
||||||
" />
|
"
|
||||||
|
/>
|
||||||
<label class="profile-item-label" for="personal-photo-operation-image">{{
|
<label class="profile-item-label" for="personal-photo-operation-image">{{
|
||||||
$t('Portrait')
|
$t('Portrait')
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-personal-user-intro"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-personal-user-intro">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-personal-user-intro"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-personal-user-intro"
|
||||||
|
>
|
||||||
<div class="profile-item-container">
|
<div class="profile-item-container">
|
||||||
<label class="profile-item-label" for="personal-summary-self-intro">{{
|
<label class="profile-item-label" for="personal-summary-self-intro">{{
|
||||||
$t('Self-intro')
|
$t('Self-intro')
|
||||||
@ -172,8 +298,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="panel-item-container" data-bs-toggle="collapse" data-bs-target="#collapse-personal-earning-now"
|
<button
|
||||||
aria-expanded="false" aria-controls="collapse-personal-earning-now">
|
class="panel-item-container"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-personal-earning-now"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-personal-earning-now"
|
||||||
|
>
|
||||||
<div class="profile-item-container">
|
<div class="profile-item-container">
|
||||||
<label class="profile-item-label" for="personal-summary-earning-now">{{
|
<label class="profile-item-label" for="personal-summary-earning-now">{{
|
||||||
$t('Earning now')
|
$t('Earning now')
|
||||||
@ -185,95 +316,185 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapse-content-container" id="collapse-user-identity" aria-labelledby="personal-summary"
|
<div
|
||||||
data-bs-parent="#personal-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-user-identity"
|
||||||
|
aria-labelledby="personal-summary"
|
||||||
|
data-bs-parent="#personal-panel"
|
||||||
|
>
|
||||||
<div class="collapse-item-container">
|
<div class="collapse-item-container">
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input type="text" v-model="identityOperation.first_name" placeholder="First Name" v-tooltip
|
<input
|
||||||
title="Click to edit" delay='{"show":"500", "hide":"100"}' readonly="true"
|
type="text"
|
||||||
@click="edittingFirstname($event)" @blur="stopEdittingFirstname($event)"
|
v-model="identityOperation.first_name"
|
||||||
@keyup.enter="blurInput($event)" />
|
placeholder="First Name"
|
||||||
|
v-tooltip
|
||||||
|
title="Click to edit"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
readonly="true"
|
||||||
|
@click="edittingFirstname($event)"
|
||||||
|
@blur="stopEdittingFirstname($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input type="text" v-model="identityOperation.last_name" placeholder="Last Name" readonly="true"
|
<input
|
||||||
@click="edittingLastname($event)" @blur="stopEdittingLastname($event)" @keyup.enter="blurInput($event)"
|
type="text"
|
||||||
v-tooltip title="Click to edit" delay='{"show":"500", "hide":"100"}' />
|
v-model="identityOperation.last_name"
|
||||||
|
placeholder="Last Name"
|
||||||
|
readonly="true"
|
||||||
|
@click="edittingLastname($event)"
|
||||||
|
@blur="stopEdittingLastname($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
v-tooltip
|
||||||
|
title="Click to edit"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse collapse-content-container" id="collapse-personal-user-photo"
|
<div
|
||||||
aria-labelledby="personal-summary" data-bs-parent="#personal-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-personal-user-photo"
|
||||||
|
aria-labelledby="personal-summary"
|
||||||
|
data-bs-parent="#personal-panel"
|
||||||
|
>
|
||||||
<div class="collapse-item-container column-flex">
|
<div class="collapse-item-container column-flex">
|
||||||
<label class="btn btn-link" for="personal-photo-operation-image">
|
<label class="btn btn-link" for="personal-photo-operation-image">
|
||||||
<img class="user-portrait-img" id="personal-photo-operation-image" alt="user portrait" :src="userProfile.account.basic.photo.base64
|
<img
|
||||||
|
class="user-portrait-img"
|
||||||
|
id="personal-photo-operation-image"
|
||||||
|
alt="user portrait"
|
||||||
|
:src="
|
||||||
|
userProfile.account.basic.photo.base64
|
||||||
? userProfile.account.basic.photo.base64
|
? userProfile.account.basic.photo.base64
|
||||||
: profileUrl
|
: profileUrl
|
||||||
" v-tooltip title="Click to update" @click="selectUserPhoto()" />
|
"
|
||||||
|
v-tooltip
|
||||||
|
title="Click to update"
|
||||||
|
@click="selectUserPhoto()"
|
||||||
|
/>
|
||||||
<div v-if="photoLoading" class="spinner-container">
|
<div v-if="photoLoading" class="spinner-container">
|
||||||
<div class="spinner-border text-primary" role="status" />
|
<div class="spinner-border text-primary" role="status" />
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
<input ref="uploadUserPhotoInput" type="file" :accept="identityOperation.photo.acceptableType" hidden
|
<input
|
||||||
@change="onUserPhotoChange($event)" />
|
ref="uploadUserPhotoInput"
|
||||||
|
type="file"
|
||||||
|
:accept="identityOperation.photo.acceptableType"
|
||||||
|
hidden
|
||||||
|
@change="onUserPhotoChange($event)"
|
||||||
|
/>
|
||||||
<p v-if="message">{{ message }}</p>
|
<p v-if="message">{{ message }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapse-content-container" id="collapse-personal-user-intro"
|
<div
|
||||||
aria-labelledby="personal-summary" data-bs-parent="#personal-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-personal-user-intro"
|
||||||
|
aria-labelledby="personal-summary"
|
||||||
|
data-bs-parent="#personal-panel"
|
||||||
|
>
|
||||||
<div class="collapse-item-container">
|
<div class="collapse-item-container">
|
||||||
<div class="collapse-item-editor">
|
<div class="collapse-item-editor">
|
||||||
<freeleaps-editor v-model:content="personalOperation.self_intro.content_html"
|
<freeleaps-editor
|
||||||
:disabled="!personalOperation.self_intro.is_editing" />
|
v-model:content="personalOperation.self_intro.content_html"
|
||||||
|
:disabled="!personalOperation.self_intro.is_editing"
|
||||||
|
/>
|
||||||
<div class="btn-group-container">
|
<div class="btn-group-container">
|
||||||
<button v-if="!personalOperation.self_intro.is_editing" class="btn btn-link"
|
<button
|
||||||
@click="personalOperation.self_intro.is_editing = true">
|
v-if="!personalOperation.self_intro.is_editing"
|
||||||
|
class="btn btn-link"
|
||||||
|
@click="personalOperation.self_intro.is_editing = true"
|
||||||
|
>
|
||||||
{{ $t('Edit') }}
|
{{ $t('Edit') }}
|
||||||
</button>
|
</button>
|
||||||
<button v-if="personalOperation.self_intro.is_editing" class="btn btn-link" type="button"
|
<button
|
||||||
data-bs-toggle="offcanvas" data-bs-target="#offcanvas-template" aria-controls="offcanvas-template">
|
v-if="personalOperation.self_intro.is_editing"
|
||||||
|
class="btn btn-link"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="offcanvas"
|
||||||
|
data-bs-target="#offcanvas-template"
|
||||||
|
aria-controls="offcanvas-template"
|
||||||
|
>
|
||||||
{{ $t('Templates') }}
|
{{ $t('Templates') }}
|
||||||
</button>
|
</button>
|
||||||
<button v-if="personalOperation.self_intro.is_editing" @click="updateSelfIntro()" class="btn btn-link">
|
<button
|
||||||
|
v-if="personalOperation.self_intro.is_editing"
|
||||||
|
@click="updateSelfIntro()"
|
||||||
|
class="btn btn-link"
|
||||||
|
>
|
||||||
{{ $t('Update') }}
|
{{ $t('Update') }}
|
||||||
</button>
|
</button>
|
||||||
<button v-if="personalOperation.self_intro.is_editing" @click="stopEdittingSelfintro($event)"
|
<button
|
||||||
class="btn btn-link">
|
v-if="personalOperation.self_intro.is_editing"
|
||||||
|
@click="stopEdittingSelfintro($event)"
|
||||||
|
class="btn btn-link"
|
||||||
|
>
|
||||||
{{ $t('Cancel') }}
|
{{ $t('Cancel') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapse-content-container" id="collapse-personal-earning-now"
|
<div
|
||||||
aria-labelledby="personal-summary" data-bs-parent="#personal-panel">
|
class="collapse collapse-content-container"
|
||||||
|
id="collapse-personal-earning-now"
|
||||||
|
aria-labelledby="personal-summary"
|
||||||
|
data-bs-parent="#personal-panel"
|
||||||
|
>
|
||||||
<div class="collapse-checkbox-container">
|
<div class="collapse-checkbox-container">
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="personal-earning-now-checkbox"
|
<input
|
||||||
v-model="personalOperation.accepting_request" @click="updateAcceptingRequest($event)"
|
class="form-check-input"
|
||||||
:disabled="!paymentOperation.ready_to_receive_money" />
|
type="checkbox"
|
||||||
|
role="switch"
|
||||||
|
id="personal-earning-now-checkbox"
|
||||||
|
v-model="personalOperation.accepting_request"
|
||||||
|
@click="updateAcceptingRequest($event)"
|
||||||
|
:disabled="!paymentOperation.ready_to_receive_money"
|
||||||
|
/>
|
||||||
<label class="form-check-label" for="personal-earning-now-checkbox">
|
<label class="form-check-label" for="personal-earning-now-checkbox">
|
||||||
<span>{{ $t('I want to be a service provider and earn money') }}</span>
|
<span>{{ $t('I want to be a service provider and earn money') }}</span>
|
||||||
<span v-if="personalOperation.show_stripe_status" style="color: red">* {{ $t('Stripe account' +
|
<span v-if="personalOperation.show_stripe_status" style="color: red"
|
||||||
'onboarding is not completed.') }}</span>
|
>* {{ $t('Stripe account' + 'onboarding is not completed.') }}</span
|
||||||
|
>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1" />
|
<div class="flex-1" />
|
||||||
<div class="collapse-item-input">
|
<div class="collapse-item-input">
|
||||||
<input id="personal-expected-salary" v-tooltip title="Click to edit" delay='{"show":"500", "hide":"100"}'
|
<input
|
||||||
readonly="true" @click="edittingExpectedSalary($event)" @blur="stopedittingExpectedSalary($event)"
|
id="personal-expected-salary"
|
||||||
@keyup.enter="blurInput($event)" v-model="personalOperation.expected_salary.hourly" />
|
v-tooltip
|
||||||
|
title="Click to edit"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
readonly="true"
|
||||||
|
@click="edittingExpectedSalary($event)"
|
||||||
|
@blur="stopedittingExpectedSalary($event)"
|
||||||
|
@keyup.enter="blurInput($event)"
|
||||||
|
v-model="personalOperation.expected_salary.hourly"
|
||||||
|
/>
|
||||||
<span class="collapse-item-currency">{{
|
<span class="collapse-item-currency">{{
|
||||||
userProfile.account.provider.expected_salary.currency
|
userProfile.account.provider.expected_salary.currency
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse-item-container column-flex">
|
<div class="collapse-item-container column-flex">
|
||||||
<label v-if="Is_Wechat_QR_Code_Payment()" class="collapse-item-uploader" for="qr-uploader">
|
<label
|
||||||
<img v-if="paymentOperation.wechat_qr_code_img.data" class="uploader-img-show"
|
v-if="Is_Wechat_QR_Code_Payment()"
|
||||||
:src="paymentOperation.wechat_qr_code_img.data" />
|
class="collapse-item-uploader"
|
||||||
<img v-if="!paymentOperation.wechat_qr_code_img.data" class="uploader-img-btn"
|
for="qr-uploader"
|
||||||
src="@/assets/images/qr-code.png" />
|
>
|
||||||
|
<img
|
||||||
|
v-if="paymentOperation.wechat_qr_code_img.data"
|
||||||
|
class="uploader-img-show"
|
||||||
|
:src="paymentOperation.wechat_qr_code_img.data"
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
v-if="!paymentOperation.wechat_qr_code_img.data"
|
||||||
|
class="uploader-img-btn"
|
||||||
|
src="@/assets/images/qr-code.png"
|
||||||
|
/>
|
||||||
<span v-if="!paymentOperation.wechat_qr_code_img.data" class="upload-text-btn">{{
|
<span v-if="!paymentOperation.wechat_qr_code_img.data" class="upload-text-btn">{{
|
||||||
$t('Upload QR code to receive payment')
|
$t('Upload QR code to receive payment')
|
||||||
}}</span>
|
}}</span>
|
||||||
@ -281,14 +502,20 @@
|
|||||||
<div class="spinner-border text-primary" role="status" />
|
<div class="spinner-border text-primary" role="status" />
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
<input v-if="Is_Wechat_QR_Code_Payment()" ref="uploadWechatQRCodePhotoInput" type="file" id="qr-uploader"
|
<input
|
||||||
:accept="paymentOperation.wechat_qr_code_img.acceptableType" hidden
|
v-if="Is_Wechat_QR_Code_Payment()"
|
||||||
@change="onUploadWechatQRCodePhoto($event)" />
|
ref="uploadWechatQRCodePhotoInput"
|
||||||
|
type="file"
|
||||||
|
id="qr-uploader"
|
||||||
|
:accept="paymentOperation.wechat_qr_code_img.acceptableType"
|
||||||
|
hidden
|
||||||
|
@change="onUploadWechatQRCodePhoto($event)"
|
||||||
|
/>
|
||||||
<p v-if="message">{{ message }}</p>
|
<p v-if="message">{{ message }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="Is_Stripe_Payment()" class="collapse-item-container">
|
<div v-if="Is_Stripe_Payment()" class="collapse-item-container">
|
||||||
<span>{{ $t('Have you linked your strip account?') }}</span><button class="btn btn-link"
|
<span>{{ $t('Have you linked your strip account?') }}</span
|
||||||
@click="visitStripe()">{{ $t('Visit Stripe') }}</button>
|
><button class="btn btn-link" @click="visitStripe()">{{ $t('Visit Stripe') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="personalOperation.accepting_request" class="collapse-item-container">
|
<div v-if="personalOperation.accepting_request" class="collapse-item-container">
|
||||||
<span>{{
|
<span>{{
|
||||||
@ -453,26 +680,49 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="offcanvas offcanvas-end offcanvas-container" tabindex="-1" id="offcanvas-template"
|
<div
|
||||||
aria-labelledby="offcanvas-template">
|
class="offcanvas offcanvas-end offcanvas-container"
|
||||||
|
tabindex="-1"
|
||||||
|
id="offcanvas-template"
|
||||||
|
aria-labelledby="offcanvas-template"
|
||||||
|
>
|
||||||
<div class="offcanvas-header">
|
<div class="offcanvas-header">
|
||||||
<h5 class="offcanvas-title" id="offcanvas-template">
|
<h5 class="offcanvas-title" id="offcanvas-template">
|
||||||
{{ $t('Apply self-intro template') }}
|
{{ $t('Apply self-intro template') }}
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-close"
|
||||||
|
data-bs-dismiss="offcanvas"
|
||||||
|
aria-label="Close"
|
||||||
|
></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="offcanvas-body">
|
<div class="offcanvas-body">
|
||||||
<div class="accordion" id="template-item-container">
|
<div class="accordion" id="template-item-container">
|
||||||
<div v-for="(template, index) in availableTemplates" :key="index" :id="'template' + index"
|
<div
|
||||||
class="accordion-item">
|
v-for="(template, index) in availableTemplates"
|
||||||
|
:key="index"
|
||||||
|
:id="'template' + index"
|
||||||
|
class="accordion-item"
|
||||||
|
>
|
||||||
<h2 class="accordion-header" :id="'heading' + index">
|
<h2 class="accordion-header" :id="'heading' + index">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
:data-bs-target="'#' + 'collapse' + index" aria-expanded="false" :aria-controls="'collapse' + index">
|
class="accordion-button collapsed"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
:data-bs-target="'#' + 'collapse' + index"
|
||||||
|
aria-expanded="false"
|
||||||
|
:aria-controls="'collapse' + index"
|
||||||
|
>
|
||||||
<span class="dashed-container">{{ template.title }}</span>
|
<span class="dashed-container">{{ template.title }}</span>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div :id="'collapse' + index" class="accordion-collapse collapse" :aria-labelledby="'heading' + index"
|
<div
|
||||||
data-bs-parent="#template-item-container">
|
:id="'collapse' + index"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
:aria-labelledby="'heading' + index"
|
||||||
|
data-bs-parent="#template-item-container"
|
||||||
|
>
|
||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
<button class="select-template-button" @click="selectTemplate(template)">
|
<button class="select-template-button" @click="selectTemplate(template)">
|
||||||
{{ $t('Choose') }}
|
{{ $t('Choose') }}
|
||||||
|
|||||||
@ -3,10 +3,20 @@
|
|||||||
<div class="message-hub-conainter">
|
<div class="message-hub-conainter">
|
||||||
<template v-if="!receiver_id">
|
<template v-if="!receiver_id">
|
||||||
<div v-if="conversations && conversations.length > 0" class="conversation-list-container">
|
<div v-if="conversations && conversations.length > 0" class="conversation-list-container">
|
||||||
<div v-for="(conversation, index) in conversations" :key="index" class="conversation-container" :class="{
|
<div
|
||||||
|
v-for="(conversation, index) in conversations"
|
||||||
|
:key="index"
|
||||||
|
class="conversation-container"
|
||||||
|
:class="{
|
||||||
selected: selConversation?.id === conversation?.id
|
selected: selConversation?.id === conversation?.id
|
||||||
}" @click="selectConversation(conversation)">
|
}"
|
||||||
<img class="participant-portrait" alt="user portrait" :src="conversation?.photo?.base64?conversation.photo.base64:profileUrl" />
|
@click="selectConversation(conversation)"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
class="participant-portrait"
|
||||||
|
alt="user portrait"
|
||||||
|
:src="conversation?.photo?.base64 ? conversation.photo.base64 : profileUrl"
|
||||||
|
/>
|
||||||
<div class="conversation-summary-container">
|
<div class="conversation-summary-container">
|
||||||
<div class="conversation-summary-header-container">
|
<div class="conversation-summary-header-container">
|
||||||
<span class="participant-fullname">
|
<span class="participant-fullname">
|
||||||
@ -23,22 +33,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!conversations || conversations.length == 0" class="conversation-list-empty-container">
|
<div
|
||||||
|
v-if="!conversations || conversations.length == 0"
|
||||||
|
class="conversation-list-empty-container"
|
||||||
|
>
|
||||||
{{ $t('Empty conversation') }}
|
{{ $t('Empty conversation') }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="message-panel-container">
|
<div class="message-panel-container">
|
||||||
<div v-if="messages && messages.length > 0" class="message-thread-container" ref="messageThreadContainer">
|
<div
|
||||||
<div v-for="(item, index) in messages" :key="index" class="message-item-container"
|
v-if="messages && messages.length > 0"
|
||||||
:class="item.sender_id == userIdentityNote ? 'me' : ''">
|
class="message-thread-container"
|
||||||
|
ref="messageThreadContainer"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in messages"
|
||||||
|
:key="index"
|
||||||
|
class="message-item-container"
|
||||||
|
:class="item.sender_id == userIdentityNote ? 'me' : ''"
|
||||||
|
>
|
||||||
<div class="message-item-header-container">
|
<div class="message-item-header-container">
|
||||||
<img class="message-item-sender-portrait" alt="user portrait" :src="conversation?.sender_photo?.base64?conversation.sender_photo.base64:profileUrl" />
|
<img
|
||||||
|
class="message-item-sender-portrait"
|
||||||
|
alt="user portrait"
|
||||||
|
:src="
|
||||||
|
conversation?.sender_photo?.base64 ? conversation.sender_photo.base64 : profileUrl
|
||||||
|
"
|
||||||
|
/>
|
||||||
<span class="message-item-sender-fullname">
|
<span class="message-item-sender-fullname">
|
||||||
{{ item.sender_firstname }}
|
{{ item.sender_firstname }}
|
||||||
{{ item.sender_lastname }}
|
{{ item.sender_lastname }}
|
||||||
</span>
|
</span>
|
||||||
<span class="message-item-create-time">
|
<span class="message-item-create-time">
|
||||||
{{ getDateFromFulltimeString(item.create_time) }}</span>
|
{{ getDateFromFulltimeString(item.create_time) }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="message-item-message-body">{{ item.message_body }}</div>
|
<div class="message-item-message-body">{{ item.message_body }}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -48,8 +76,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="message-writing-panel-container">
|
<div class="message-writing-panel-container">
|
||||||
<svg-icon icon="msg-enter" class-name="writing-message-enter" />
|
<svg-icon icon="msg-enter" class-name="writing-message-enter" />
|
||||||
<input class="writing-message-input" type="text" v-model="writtenMessage"
|
<input
|
||||||
@keypress.enter="sendMessage(selConversation?.id)" />
|
class="writing-message-input"
|
||||||
|
type="text"
|
||||||
|
v-model="writtenMessage"
|
||||||
|
@keypress.enter="sendMessage(selConversation?.id)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -130,7 +162,7 @@ export default {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.messages = response?.data || []
|
this.messages = response?.data || []
|
||||||
console.log('Received message for conversation:', conversation_id)
|
console.log('Received message for conversation:', conversation_id)
|
||||||
this.scrollToNewestMessageThread();
|
this.scrollToNewestMessageThread()
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.mnx_backendErrorHandler(error)
|
this.mnx_backendErrorHandler(error)
|
||||||
@ -171,8 +203,8 @@ export default {
|
|||||||
this.writtenMessage = null
|
this.writtenMessage = null
|
||||||
|
|
||||||
// Scroll to the newest message
|
// Scroll to the newest message
|
||||||
this.scrollToNewestMessage();
|
this.scrollToNewestMessage()
|
||||||
this.scrollToNewestMessageThread();
|
this.scrollToNewestMessageThread()
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.mnx_backendErrorHandler(error)
|
this.mnx_backendErrorHandler(error)
|
||||||
@ -194,17 +226,17 @@ export default {
|
|||||||
},
|
},
|
||||||
scrollToNewestMessage() {
|
scrollToNewestMessage() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const messagesContainer = this.$refs.messagesContainer;
|
const messagesContainer = this.$refs.messagesContainer
|
||||||
messagesContainer.scrollTop = messagesContainer.scrollHeight
|
messagesContainer.scrollTop = messagesContainer.scrollHeight
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
scrollToNewestMessageThread() {
|
scrollToNewestMessageThread() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const messageThreadContainer = this.$refs.messageThreadContainer;
|
const messageThreadContainer = this.$refs.messageThreadContainer
|
||||||
if (messageThreadContainer != null) {
|
if (messageThreadContainer != null) {
|
||||||
messageThreadContainer.scrollTop = messageThreadContainer.scrollHeight
|
messageThreadContainer.scrollTop = messageThreadContainer.scrollHeight
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,21 @@
|
|||||||
<empty-content :loading="loading" :empty="recommendedProviders?.length === 0" />
|
<empty-content :loading="loading" :empty="recommendedProviders?.length === 0" />
|
||||||
<div class="provider-hub-container" id="provider-accordion-container">
|
<div class="provider-hub-container" id="provider-accordion-container">
|
||||||
<template v-if="recommendedProviders">
|
<template v-if="recommendedProviders">
|
||||||
<div class="accordion accordion-list" v-for="(provider, index) in recommendedProviders" :key="index">
|
<div
|
||||||
|
class="accordion accordion-list"
|
||||||
|
v-for="(provider, index) in recommendedProviders"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<div class="accordion-item my-3">
|
<div class="accordion-item my-3">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
:data-bs-target="'#collapse' + index" aria-expanded="false" :aria-controls="'collapse' + index">
|
class="accordion-button collapsed"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
:data-bs-target="'#collapse' + index"
|
||||||
|
aria-expanded="false"
|
||||||
|
:aria-controls="'collapse' + index"
|
||||||
|
>
|
||||||
<div class="provider-summary-containter dashed-container">
|
<div class="provider-summary-containter dashed-container">
|
||||||
<div class="provider-portrait-containter">
|
<div class="provider-portrait-containter">
|
||||||
<img class="provider-portrait" alt="user portrait" src="@/assets/profile.png" />
|
<img class="provider-portrait" alt="user portrait" src="@/assets/profile.png" />
|
||||||
@ -15,7 +25,8 @@
|
|||||||
<label class="provider-name-label" for="provider-name">{{ $t('Name') }}</label>
|
<label class="provider-name-label" for="provider-name">{{ $t('Name') }}</label>
|
||||||
<span class="provider-name-span" id="provider-name">
|
<span class="provider-name-span" id="provider-name">
|
||||||
{{ provider.user_profile.first_name }}
|
{{ provider.user_profile.first_name }}
|
||||||
{{ provider.user_profile.last_name }}</span>
|
{{ provider.user_profile.last_name }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="provider-stay-on-freeleaps-container">
|
<div class="provider-stay-on-freeleaps-container">
|
||||||
<label class="provider-stay-on-freeleaps-label" for="provider-stay-on-freeleaps">
|
<label class="provider-stay-on-freeleaps-label" for="provider-stay-on-freeleaps">
|
||||||
@ -23,11 +34,16 @@
|
|||||||
</label>
|
</label>
|
||||||
<span class="provider-stay-on-freeleaps-span" id="provider-stay-on-freeleaps">
|
<span class="provider-stay-on-freeleaps-span" id="provider-stay-on-freeleaps">
|
||||||
{{ provider.activeness_achievement.days_of_staying_on }}
|
{{ provider.activeness_achievement.days_of_staying_on }}
|
||||||
{{ $t('day(s)') }}</span>
|
{{ $t('day(s)') }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="provider-delivered-projects-container">
|
<div class="provider-delivered-projects-container">
|
||||||
<label class="provider-delivered-projects-label" for="provider-delivered-projects">
|
<label
|
||||||
{{ $t('Delivered projects') }}</label>
|
class="provider-delivered-projects-label"
|
||||||
|
for="provider-delivered-projects"
|
||||||
|
>
|
||||||
|
{{ $t('Delivered projects') }}</label
|
||||||
|
>
|
||||||
<span class="provider-delivered-projects-span" id="provider-delivered-projects">
|
<span class="provider-delivered-projects-span" id="provider-delivered-projects">
|
||||||
{{ provider.provider_achievement.delivered_projects }}
|
{{ provider.provider_achievement.delivered_projects }}
|
||||||
</span>
|
</span>
|
||||||
@ -48,20 +64,27 @@
|
|||||||
$t('Credit score')
|
$t('Credit score')
|
||||||
}}</label>
|
}}</label>
|
||||||
<span class="provider-credit-score-span" id="provider-credit-score">
|
<span class="provider-credit-score-span" id="provider-credit-score">
|
||||||
{{ provider.provider_achievement.credit }}</span>
|
{{ provider.provider_achievement.credit }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div :id="'collapse' + index" class="accordion-collapse collapse"
|
<div
|
||||||
data-bs-parent="#provider-accordion-container">
|
:id="'collapse' + index"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
data-bs-parent="#provider-accordion-container"
|
||||||
|
>
|
||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
<div class="self-intro-container">
|
<div class="self-intro-container">
|
||||||
<label class="self-intro-content-label" for="self-intro-content">{{
|
<label class="self-intro-content-label" for="self-intro-content">{{
|
||||||
$t('Self intro')
|
$t('Self intro')
|
||||||
}}</label>
|
}}</label>
|
||||||
<div class="self-intro-content-container" id="self-intro-content"
|
<div
|
||||||
v-html="provider.user_profile.self_intro.content_html"></div>
|
class="self-intro-content-container"
|
||||||
|
id="self-intro-content"
|
||||||
|
v-html="provider.user_profile.self_intro.content_html"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="statistics-container">
|
<div class="statistics-container">
|
||||||
<label class="self-intro-content-label" for="statistics-content">{{
|
<label class="self-intro-content-label" for="statistics-content">{{
|
||||||
@ -90,10 +113,16 @@
|
|||||||
<label class="dd-project-label" for="delivery-top-programming-language">{{
|
<label class="dd-project-label" for="delivery-top-programming-language">{{
|
||||||
$t('Top programming languages')
|
$t('Top programming languages')
|
||||||
}}</label>
|
}}</label>
|
||||||
<div class="delivery-top-programming-language-content-container"
|
<div
|
||||||
id="delivery-top-programming-language">
|
class="delivery-top-programming-language-content-container"
|
||||||
<span v-for="(lang, index) in provider.provider_deliveries
|
id="delivery-top-programming-language"
|
||||||
.top_programming_languages" :key="index" class="dd-project-span">
|
>
|
||||||
|
<span
|
||||||
|
v-for="(lang, index) in provider.provider_deliveries
|
||||||
|
.top_programming_languages"
|
||||||
|
:key="index"
|
||||||
|
class="dd-project-span"
|
||||||
|
>
|
||||||
#{{ lang }}
|
#{{ lang }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -185,26 +214,35 @@
|
|||||||
$t('Action panel')
|
$t('Action panel')
|
||||||
}}</label>
|
}}</label>
|
||||||
<div class="invite-to-request-container">
|
<div class="invite-to-request-container">
|
||||||
<label class="invite-to-request-content-label" for="invite-to-request-content">{{ $t('Invite')
|
<label class="invite-to-request-content-label" for="invite-to-request-content"
|
||||||
}}
|
>{{ $t('Invite') }}
|
||||||
<span class="invite-to-request-name-span">{{ provider.user_profile.first_name }}
|
<span class="invite-to-request-name-span"
|
||||||
{{ provider.user_profile.last_name }}</span>
|
>{{ provider.user_profile.first_name }}
|
||||||
{{ $t('to my open requests') }}</label>
|
{{ provider.user_profile.last_name }}</span
|
||||||
|
>
|
||||||
|
{{ $t('to my open requests') }}</label
|
||||||
|
>
|
||||||
<div class="invite-to-request-content-container" id="invite-to-request-content">
|
<div class="invite-to-request-content-container" id="invite-to-request-content">
|
||||||
<div class="form-check" v-for="(request, index) in requests" :key="index">
|
<div class="form-check" v-for="(request, index) in requests" :key="index">
|
||||||
<input class="form-check-input" type="checkbox" :value="request.id"
|
<input
|
||||||
:id="'check' + request.id" v-model="checkedRequests" @change="
|
class="form-check-input"
|
||||||
checkRequest($event, request.id, provider.user_profile.user_id)
|
type="checkbox"
|
||||||
" />
|
:value="request.id"
|
||||||
|
:id="'check' + request.id"
|
||||||
|
v-model="checkedRequests"
|
||||||
|
@change="checkRequest($event, request.id, provider.user_profile.user_id)"
|
||||||
|
/>
|
||||||
<label class="form-check-label" :for="'check' + request.id">{{
|
<label class="form-check-label" :for="'check' + request.id">{{
|
||||||
request.title
|
request.title
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
<span class="invite-to-request-note-text">*{{
|
<span class="invite-to-request-note-text"
|
||||||
|
>*{{
|
||||||
$t(
|
$t(
|
||||||
'Once the request is selected, the provider will be invited to see the request.'
|
'Once the request is selected, the provider will be invited to see the request.'
|
||||||
)
|
)
|
||||||
}}</span>
|
}}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -418,7 +456,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.marb-10 {
|
.marb-10 {
|
||||||
margin-bottom: 10px !important
|
margin-bottom: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.self-intro-content-container {
|
.self-intro-content-container {
|
||||||
|
|||||||
@ -127,8 +127,8 @@
|
|||||||
<label
|
<label
|
||||||
class="issuer-achievement-label"
|
class="issuer-achievement-label"
|
||||||
for="issuer-achievement-stay-content-div"
|
for="issuer-achievement-stay-content-div"
|
||||||
>{{ $t('Stay on Freeleaps') }}</label
|
>{{ $t('Stay on Freeleaps') }}
|
||||||
>
|
</label>
|
||||||
<div
|
<div
|
||||||
class="issuer-achievement-content-container"
|
class="issuer-achievement-content-container"
|
||||||
id="issuer-achievement-stay-content-div"
|
id="issuer-achievement-stay-content-div"
|
||||||
@ -279,7 +279,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
downloadAttachedFile(request_id, document_id, file_name) {
|
downloadAttachedFile(request_id, document_id, file_name) {
|
||||||
|
|
||||||
// window.open(`http://${window.location.host}/api/workspace/request/fetch-attached-file-as-download?request_id=${request_id}&document_id=${document_id}`)
|
// window.open(`http://${window.location.host}/api/workspace/request/fetch-attached-file-as-download?request_id=${request_id}&document_id=${document_id}`)
|
||||||
|
|
||||||
// const link = document.createElement('a')
|
// const link = document.createElement('a')
|
||||||
@ -294,7 +293,7 @@ export default {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log('resposne', response)
|
console.log('resposne', response)
|
||||||
// create file link in browser's memory
|
// create file link in browser's memory
|
||||||
// const href = URL.createObjectURL(response.data)
|
// const ahref = URL.createObjectURL(response.data.download_url)
|
||||||
|
|
||||||
// create "a" HTML element with href to file & click
|
// create "a" HTML element with href to file & click
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
|
|||||||
@ -2,13 +2,22 @@
|
|||||||
<empty-content :loading="loading" :empty="projects?.length === 0" />
|
<empty-content :loading="loading" :empty="projects?.length === 0" />
|
||||||
<div v-if="projects && projects.length > 0" class="workspace-container">
|
<div v-if="projects && projects.length > 0" class="workspace-container">
|
||||||
<div class="workspace-body">
|
<div class="workspace-body">
|
||||||
<div class="accordion accordion-list" v-for="(project, project_index) in projects" :key="project_index"
|
<div
|
||||||
:id="project.id">
|
class="accordion accordion-list"
|
||||||
|
v-for="(project, project_index) in projects"
|
||||||
|
:key="project_index"
|
||||||
|
:id="project.id"
|
||||||
|
>
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
:data-bs-target="'#collapse-' + project_index" aria-expanded="false"
|
class="accordion-button collapsed"
|
||||||
:aria-controls="'collapse-' + project_index">
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
:data-bs-target="'#collapse-' + project_index"
|
||||||
|
aria-expanded="false"
|
||||||
|
:aria-controls="'collapse-' + project_index"
|
||||||
|
>
|
||||||
<div class="workspace-item-bar dashed-container">
|
<div class="workspace-item-bar dashed-container">
|
||||||
<div class="workspace-item-bar-left">
|
<div class="workspace-item-bar-left">
|
||||||
<div class="project-item-title-container">
|
<div class="project-item-title-container">
|
||||||
@ -17,7 +26,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="project-item-status-container">
|
<div class="project-item-status-container">
|
||||||
<label class="project-item-label">{{ $t('Status') }}</label>
|
<label class="project-item-label">{{ $t('Status') }}</label>
|
||||||
<p class="project-item-text">{{ fromIntToProjectStatus(project.status) }}</p>
|
<p class="project-item-text">
|
||||||
|
{{ $t(fromIntToProjectStatus(project.status)) }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="project-item-date-container">
|
<div class="project-item-date-container">
|
||||||
<label class="project-item-label">{{ $t('Update') }}</label>
|
<label class="project-item-label">{{ $t('Update') }}</label>
|
||||||
@ -29,8 +40,9 @@
|
|||||||
<div class="workspace-item-bar-right">
|
<div class="workspace-item-bar-right">
|
||||||
<div class="project-item-inform-container">
|
<div class="project-item-inform-container">
|
||||||
<label class="project-item-label">{{ $t('Issuer') }}</label>
|
<label class="project-item-label">{{ $t('Issuer') }}</label>
|
||||||
<p class="project-item-text">{{ project?.issuer?.first_name }}
|
<p class="project-item-text">
|
||||||
{{ project?.issuer?.last_name }}</p>
|
{{ project?.issuer?.first_name }} {{ project?.issuer?.last_name }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="workspace-item-bar-right">
|
<!-- <div class="workspace-item-bar-right">
|
||||||
@ -42,7 +54,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div :id="'collapse-' + project_index" class="accordion-collapse collapse" :data-bs-parent="'#' + project.id">
|
<div
|
||||||
|
:id="'collapse-' + project_index"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
:data-bs-parent="'#' + project.id"
|
||||||
|
>
|
||||||
<div class="accordion-body" v-if="isOpenRequest(project)">
|
<div class="accordion-body" v-if="isOpenRequest(project)">
|
||||||
<div class="float-action-container">
|
<div class="float-action-container">
|
||||||
<button class="request-action-withdraw" @click="withdrawAndEditRequest(project)">
|
<button class="request-action-withdraw" @click="withdrawAndEditRequest(project)">
|
||||||
@ -50,17 +66,30 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="project-request-container">
|
<div class="project-request-container">
|
||||||
<div class="project-request-content" v-html="project.request.content" @keyup="textAreaAdjust($event)"
|
<div
|
||||||
contenteditable="false"></div>
|
class="project-request-content"
|
||||||
|
v-html="project.request.content"
|
||||||
|
@keyup="textAreaAdjust($event)"
|
||||||
|
contenteditable="false"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="project-request-proposals-container">
|
<div class="project-request-proposals-container">
|
||||||
<div class="accordion" v-for="(proposal, proposal_index) in project.proposals" :key="proposal_index"
|
<div
|
||||||
:id="proposal.id">
|
class="accordion"
|
||||||
|
v-for="(proposal, proposal_index) in project.proposals"
|
||||||
|
:key="proposal_index"
|
||||||
|
:id="proposal.id"
|
||||||
|
>
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
:data-bs-target="'#collapse-request-proposal' + proposal_index" aria-expanded="false"
|
class="accordion-button collapsed"
|
||||||
:aria-controls="'collapse-request-proposal' + proposal_index">
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
:data-bs-target="'#collapse-request-proposal' + proposal_index"
|
||||||
|
aria-expanded="false"
|
||||||
|
:aria-controls="'collapse-request-proposal' + proposal_index"
|
||||||
|
>
|
||||||
<div class="project-request-proposal-bar-container">
|
<div class="project-request-proposal-bar-container">
|
||||||
<div class="project-request-proposal-quote-container">
|
<div class="project-request-proposal-quote-container">
|
||||||
<label class="project-item-label">{{ $t('Quote') }}</label>
|
<label class="project-item-label">{{ $t('Quote') }}</label>
|
||||||
@ -95,16 +124,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div :id="'collapse-request-proposal' + proposal_index" class="accordion-collapse collapse"
|
<div
|
||||||
:data-bs-parent="'#' + proposal.id">
|
:id="'collapse-request-proposal' + proposal_index"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
:data-bs-parent="'#' + proposal.id"
|
||||||
|
>
|
||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
<div class="request-proposal-action-container">
|
<div class="request-proposal-action-container">
|
||||||
<button class="request-proposal-action-reject"
|
<button
|
||||||
@click="rejectProposal(project, proposal_index)">
|
class="request-proposal-action-reject"
|
||||||
|
@click="rejectProposal(project, proposal_index)"
|
||||||
|
>
|
||||||
{{ $t('reject') }}
|
{{ $t('reject') }}
|
||||||
</button>
|
</button>
|
||||||
<button class="request-proposal-action-accept"
|
<button
|
||||||
@click="acceptProposal(project, proposal_index)">
|
class="request-proposal-action-accept"
|
||||||
|
@click="acceptProposal(project, proposal_index)"
|
||||||
|
>
|
||||||
{{ $t('accept') }}
|
{{ $t('accept') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -112,9 +148,12 @@
|
|||||||
<div class="request-proposal-content" v-html="proposal.content" />
|
<div class="request-proposal-content" v-html="proposal.content" />
|
||||||
</div>
|
</div>
|
||||||
<div class="request-proposal-payment-plan">
|
<div class="request-proposal-payment-plan">
|
||||||
<div class="request-proposal-payment-plan-stage-container"
|
<div
|
||||||
v-for="(stage, stage_index) in proposal.payment_plan.stages" :key="stage_index"
|
class="request-proposal-payment-plan-stage-container"
|
||||||
:id="'payment-stage-' + stage_index">
|
v-for="(stage, stage_index) in proposal.payment_plan.stages"
|
||||||
|
:key="stage_index"
|
||||||
|
:id="'payment-stage-' + stage_index"
|
||||||
|
>
|
||||||
<div class="project-request-proposal-stage-payment-container">
|
<div class="project-request-proposal-stage-payment-container">
|
||||||
<label class="project-item-label">{{ $t('Payment') }}</label>
|
<label class="project-item-label">{{ $t('Payment') }}</label>
|
||||||
<p class="project-item-text">
|
<p class="project-item-text">
|
||||||
@ -149,9 +188,12 @@
|
|||||||
<div class="request-proposal-content" v-html="project.proposal.content" />
|
<div class="request-proposal-content" v-html="project.proposal.content" />
|
||||||
</div>
|
</div>
|
||||||
<div class="request-proposal-payment-plan">
|
<div class="request-proposal-payment-plan">
|
||||||
<div class="request-proposal-payment-plan-stage-container"
|
<div
|
||||||
v-for="(stage, stage_index) in project.proposal.payment_plan.stages" :key="stage_index"
|
class="request-proposal-payment-plan-stage-container"
|
||||||
:id="'payment-stage-' + stage_index">
|
v-for="(stage, stage_index) in project.proposal.payment_plan.stages"
|
||||||
|
:key="stage_index"
|
||||||
|
:id="'payment-stage-' + stage_index"
|
||||||
|
>
|
||||||
<div class="project-request-proposal-stage-payment-container">
|
<div class="project-request-proposal-stage-payment-container">
|
||||||
<label class="project-item-label">{{ $t('Payment') }}</label>
|
<label class="project-item-label">{{ $t('Payment') }}</label>
|
||||||
<p class="project-item-text">{{ stage.amount }} {{ stage.currency }}</p>
|
<p class="project-item-text">{{ stage.amount }} {{ stage.currency }}</p>
|
||||||
@ -169,24 +211,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="project-request-container">
|
<div class="project-request-container">
|
||||||
<div class="project-request-content" v-html="project.request.content" @keyup="textAreaAdjust($event)"
|
<div
|
||||||
contenteditable="false"></div>
|
class="project-request-content"
|
||||||
|
v-html="project.request.content"
|
||||||
|
@keyup="textAreaAdjust($event)"
|
||||||
|
contenteditable="false"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="accordion-body inline-accordion-body" v-if="isOngoingProject(project)">
|
<div class="accordion-body inline-accordion-body" v-if="isOngoingProject(project)">
|
||||||
<div class="project-invite-collaborator-containter">
|
<div class="project-invite-collaborator-containter">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
data-bs-target="#collapse-project-invite-collaborator" aria-expanded="false"
|
class="accordion-button collapsed"
|
||||||
aria-controls="collapse-project-invite-collaborator">
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-project-invite-collaborator"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-project-invite-collaborator"
|
||||||
|
>
|
||||||
<div class="project-invite-collaborator">+ {{ $t('Invite') }}</div>
|
<div class="project-invite-collaborator">+ {{ $t('Invite') }}</div>
|
||||||
</button>
|
</button>
|
||||||
<div id="collapse-project-invite-collaborator" class="accordion-collapse collapse"
|
<div
|
||||||
data-bs-parent="#collapse-project-invite-collaborator">
|
id="collapse-project-invite-collaborator"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
data-bs-parent="#collapse-project-invite-collaborator"
|
||||||
|
>
|
||||||
<div class="project-invite-collaborator-form-container">
|
<div class="project-invite-collaborator-form-container">
|
||||||
<input type="text" v-model="newInviteCollaborator[project_index]"
|
<input
|
||||||
:placeholder="$t('Input E-mail to invite other')" @keydown.enter="
|
type="text"
|
||||||
|
v-model="newInviteCollaborator[project_index]"
|
||||||
|
:placeholder="$t('Input E-mail to invite other')"
|
||||||
|
@keydown.enter="
|
||||||
inviteCollaborator(project.project_id, newInviteCollaborator[project_index])
|
inviteCollaborator(project.project_id, newInviteCollaborator[project_index])
|
||||||
" />
|
"
|
||||||
|
/>
|
||||||
<svg-icon icon="msg-enter" class-name="project-invite-enter" />
|
<svg-icon icon="msg-enter" class-name="project-invite-enter" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -194,9 +252,14 @@
|
|||||||
<div class="accordion" id="workspace-project-accordion">
|
<div class="accordion" id="workspace-project-accordion">
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
data-bs-target="#collapse-project-milestone" aria-expanded="false"
|
class="accordion-button collapsed"
|
||||||
aria-controls="collapse-project-milestone">
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-project-milestone"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-project-milestone"
|
||||||
|
>
|
||||||
<div class="project-milestone-bar-container dashed-container">
|
<div class="project-milestone-bar-container dashed-container">
|
||||||
<div class="project-milestone-bar-progress">
|
<div class="project-milestone-bar-progress">
|
||||||
<label class="project-item-label">{{ $t('Progress') }}</label>
|
<label class="project-item-label">{{ $t('Progress') }}</label>
|
||||||
@ -210,9 +273,7 @@
|
|||||||
<div class="project-milestone-bar-status">
|
<div class="project-milestone-bar-status">
|
||||||
<label class="project-item-label">{{ $t('Status') }}</label>
|
<label class="project-item-label">{{ $t('Status') }}</label>
|
||||||
<p class="project-item-text">
|
<p class="project-item-text">
|
||||||
{{
|
{{ $t(fromIntToMilestoneStatus(project.status)) }}
|
||||||
fromIntToMilestoneStatus(project.project.progress.milestone_status)
|
|
||||||
}}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="project-milestone-bar-paid">
|
<div class="project-milestone-bar-paid">
|
||||||
@ -232,11 +293,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div id="collapse-project-milestone" class="accordion-collapse collapse"
|
<div
|
||||||
data-bs-parent="#collapse-project-milestone">
|
id="collapse-project-milestone"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
data-bs-parent="#collapse-project-milestone"
|
||||||
|
>
|
||||||
<table class="project-milestones-table">
|
<table class="project-milestones-table">
|
||||||
<tbody v-for="milestone in project.project.progress.milestones" :key="milestone.index"
|
<tbody
|
||||||
:id="'project-milestone-' + milestone.index">
|
v-for="milestone in project.project.progress.milestones"
|
||||||
|
:key="milestone.index"
|
||||||
|
:id="'project-milestone-' + milestone.index"
|
||||||
|
>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="project-milestones-table-content">
|
<div class="project-milestones-table-content">
|
||||||
@ -260,7 +327,7 @@
|
|||||||
<div class="project-milestones-table-content">
|
<div class="project-milestones-table-content">
|
||||||
<span class="project-milestones-table-label">{{ $t('Status') }}</span>
|
<span class="project-milestones-table-label">{{ $t('Status') }}</span>
|
||||||
<span class="project-milestones-table-span">{{
|
<span class="project-milestones-table-span">{{
|
||||||
fromIntToMilestoneStatus(milestone.status)
|
$t(fromIntToMilestoneStatus(milestone.status))
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -291,9 +358,14 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="project-milestones-table-content">
|
<div class="project-milestones-table-content">
|
||||||
<span class="project-milestones-table-label">{{ $t('Action') }}</span>
|
<span class="project-milestones-table-label">{{ $t('Action') }}</span>
|
||||||
<button class="project-milestones-table-btn" :disabled="isMilestoneActionButtonDisabled(project.project, milestone)
|
<button
|
||||||
" :hidden="isMilestoneActionButtonHidden(project.project, milestone)"
|
class="project-milestones-table-btn"
|
||||||
@click="handleMilestoneAction(project.project, milestone)">
|
:disabled="
|
||||||
|
isMilestoneActionButtonDisabled(project.project, milestone)
|
||||||
|
"
|
||||||
|
:hidden="isMilestoneActionButtonHidden(project.project, milestone)"
|
||||||
|
@click="handleMilestoneAction(project.project, milestone)"
|
||||||
|
>
|
||||||
{{ fetchMilestoneActionButtonText(project.project, milestone) }}
|
{{ fetchMilestoneActionButtonText(project.project, milestone) }}
|
||||||
</button>
|
</button>
|
||||||
<!-- <span class="project-milestones-table-span">{{ getDateFromFulltimeString(milestone.update_time) }}</span> -->
|
<!-- <span class="project-milestones-table-span">{{ getDateFromFulltimeString(milestone.update_time) }}</span> -->
|
||||||
@ -304,8 +376,10 @@
|
|||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
<div class="project-milestones-qrcode-content">
|
<div class="project-milestones-qrcode-content">
|
||||||
<img :src="this.qrCode.imageUrl" alt="freeleaps" />
|
<img :src="this.qrCode.imageUrl" alt="freeleaps" />
|
||||||
<button class="project-milestones-qrcode-button"
|
<button
|
||||||
@click="handlePaymentAction(project.project, milestone)">
|
class="project-milestones-qrcode-button"
|
||||||
|
@click="handlePaymentAction(project.project, milestone)"
|
||||||
|
>
|
||||||
{{ $t('Mark As Paid') }}
|
{{ $t('Mark As Paid') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -317,9 +391,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
data-bs-target="#collapse-project-code" aria-expanded="false"
|
class="accordion-button collapsed"
|
||||||
aria-controls="collapse-project-code">
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-project-code"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-project-code"
|
||||||
|
>
|
||||||
<div class="project-code-bar-container dashed-container">
|
<div class="project-code-bar-container dashed-container">
|
||||||
<div class="project-code-git-status">
|
<div class="project-code-git-status">
|
||||||
<label class="project-item-label">{{ $t('Code Depot') }}</label>
|
<label class="project-item-label">{{ $t('Code Depot') }}</label>
|
||||||
@ -342,13 +421,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div id="collapse-project-code" class="accordion-collapse collapse"
|
<div
|
||||||
data-bs-parent="#collapse-project-code">
|
id="collapse-project-code"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
data-bs-parent="#collapse-project-code"
|
||||||
|
>
|
||||||
<div class="project-code-details-container">
|
<div class="project-code-details-container">
|
||||||
<div class="project-code-git-url-container">
|
<div class="project-code-git-url-container">
|
||||||
<button v-if="project.project.code?.git_url" class="project-code-copy-git-url"
|
<button
|
||||||
@click="copyCodeGit(project)" v-tooltip title="Copied" trigger="click"
|
v-if="project.project.code?.git_url"
|
||||||
delay='{"show":"500", "hide":"100"}'>
|
class="project-code-copy-git-url"
|
||||||
|
@click="copyCodeGit(project)"
|
||||||
|
v-tooltip
|
||||||
|
title="Copied"
|
||||||
|
trigger="click"
|
||||||
|
delay='{"show":"500", "hide":"100"}'
|
||||||
|
>
|
||||||
{{ $t('copy git url') }}
|
{{ $t('copy git url') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -357,16 +445,21 @@
|
|||||||
{{ $t('TO BE IMPLEMENTED.') }}
|
{{ $t('TO BE IMPLEMENTED.') }}
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="chart-container">
|
<div class="chart-container">
|
||||||
<v-chart :option="currentChartData" autoresize />
|
<line-chart :data="getCodeChartData(project.project.code)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
data-bs-target="#collapse-project-issue" aria-expanded="false"
|
class="accordion-button collapsed"
|
||||||
aria-controls="collapse-project-issue">
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#collapse-project-issue"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="collapse-project-issue"
|
||||||
|
>
|
||||||
<div class="project-issue-bar-container dashed-container">
|
<div class="project-issue-bar-container dashed-container">
|
||||||
<div class="project-issue-open-issues">
|
<div class="project-issue-open-issues">
|
||||||
<label class="project-item-label">{{ $t('Open issues') }}</label>
|
<label class="project-item-label">{{ $t('Open issues') }}</label>
|
||||||
@ -389,15 +482,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div id="collapse-project-issue" class="accordion-collapse collapse"
|
<div
|
||||||
data-bs-parent="#collapse-project-issue">
|
id="collapse-project-issue"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
data-bs-parent="#collapse-project-issue"
|
||||||
|
>
|
||||||
<div class="project-code-git-url-container">
|
<div class="project-code-git-url-container">
|
||||||
<button class="project-code-copy-git-url" @click="gotoIssueManage(project)">
|
<button class="project-code-copy-git-url" @click="gotoIssueManage(project)">
|
||||||
{{ $t('Issues management') }}
|
{{ $t('Issues management') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-container">
|
<div class="chart-container">
|
||||||
<v-chart :option="currentChartData" autoresize />
|
<line-chart :data="getIssueChartData(project.project.issue)" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="project-invite-collaborator-containter">
|
<!-- <div class="project-invite-collaborator-containter">
|
||||||
<button
|
<button
|
||||||
@ -519,16 +615,11 @@ import {
|
|||||||
convertIntoToMilestoneStatus,
|
convertIntoToMilestoneStatus,
|
||||||
convertIntoToProjectIssueStatus
|
convertIntoToProjectIssueStatus
|
||||||
} from '@/types/index'
|
} from '@/types/index'
|
||||||
import { use } from 'echarts/core'
|
import LineChart from '@/components/LineChart.vue'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
|
||||||
import { LineChart } from 'echarts/charts'
|
|
||||||
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
|
|
||||||
import VChart from 'vue-echarts'
|
|
||||||
import EmptyContent from '@/components/EmptyContent.vue'
|
import EmptyContent from '@/components/EmptyContent.vue'
|
||||||
use([CanvasRenderer, LineChart, LegendComponent, GridComponent, TooltipComponent])
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Workspace',
|
name: 'Workspace',
|
||||||
components: { VChart, EmptyContent },
|
components: { LineChart, EmptyContent },
|
||||||
props: {},
|
props: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@ -546,31 +637,21 @@ export default {
|
|||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
index: null
|
index: null
|
||||||
},
|
},
|
||||||
currentChartData: {
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
boundaryGap: false,
|
|
||||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
||||||
type: 'line',
|
|
||||||
areaStyle: { color: 'rgba(63,73,255,0.1)' },
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
connectNulls: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
downstream_web_socket: null
|
downstream_web_socket: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
// To be called with initiating zoom call
|
||||||
|
redirectToZoomOAuth() {
|
||||||
|
const clientId = 'YwetcrCFTzS_fHELZjkhPw'
|
||||||
|
const redirectUri = 'http://localhost:5173/api/messages/oauth/zoom/callback'
|
||||||
|
const zoomOAuthUrl = `https://zoom.us/oauth/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&scope=meeting:write:meeting`
|
||||||
|
|
||||||
|
// Redirect the user to Zoom's OAuth 2.0 consent page
|
||||||
|
window.location.href = zoomOAuthUrl
|
||||||
|
},
|
||||||
|
// You can use this function on a button click to start the OAuth process,
|
||||||
fetchView() {
|
fetchView() {
|
||||||
WorksapceApi.fetchWorkspaceView()
|
WorksapceApi.fetchWorkspaceView()
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@ -907,6 +988,62 @@ export default {
|
|||||||
this.websocketOnError,
|
this.websocketOnError,
|
||||||
this.websocketOnClose
|
this.websocketOnClose
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
getCodeChartData(code) {
|
||||||
|
const { weekly_commits } = code
|
||||||
|
if (weekly_commits) {
|
||||||
|
// 把数据按日期排序
|
||||||
|
const sortData = Object.entries(weekly_commits).sort((a, b) => new Date(a[0]) - new Date(b[0]));
|
||||||
|
return {
|
||||||
|
xData: sortData.map(data => data[0]),
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: sortData.map(data => data[1]),
|
||||||
|
type: 'line',
|
||||||
|
name: 'commits',
|
||||||
|
areaStyle: { color: 'rgba(63,73,255,0.1)' },
|
||||||
|
smooth: true,
|
||||||
|
symbol: 'none',
|
||||||
|
connectNulls: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
getIssueChartData(issue) {
|
||||||
|
const { weekly_open_issues, weekly_resolved_issues } = issue
|
||||||
|
if (weekly_open_issues && weekly_resolved_issues) {
|
||||||
|
// 把数据按日期排序
|
||||||
|
const sortOpenData = Object.entries(weekly_open_issues).sort((a, b) => new Date(a[0]) - new Date(b[0]));
|
||||||
|
const sortResolvedData = Object.entries(weekly_resolved_issues).sort((a, b) => new Date(a[0]) - new Date(b[0]));
|
||||||
|
return {
|
||||||
|
xData: sortOpenData.map(data => data[0]),
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: sortOpenData.map(data => data[1]),
|
||||||
|
name: 'open',
|
||||||
|
type: 'line',
|
||||||
|
stack: 'issue',
|
||||||
|
areaStyle: { color: 'rgba(63,73,255,0.1)' },
|
||||||
|
smooth: true,
|
||||||
|
symbol: 'none',
|
||||||
|
connectNulls: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: sortResolvedData.map(data => data[1]),
|
||||||
|
name: 'resolved',
|
||||||
|
type: 'line',
|
||||||
|
stack: 'issue',
|
||||||
|
areaStyle: { color: 'rgba(63,73,255,0.2)' },
|
||||||
|
smooth: true,
|
||||||
|
symbol: 'none',
|
||||||
|
connectNulls: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -988,7 +1125,7 @@ export default {
|
|||||||
// padding: 32px;
|
// padding: 32px;
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
margin-top: -12px;
|
margin-top: -12px;
|
||||||
border-top: 1px solid #e1e1e1
|
border-top: 1px solid #e1e1e1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-action-container {
|
.float-action-container {
|
||||||
|
|||||||
@ -112,6 +112,17 @@
|
|||||||
<p v-if="!updatingIssue || updatingIssue.issue_id !== issue.id" class="project-item-text">
|
<p v-if="!updatingIssue || updatingIssue.issue_id !== issue.id" class="project-item-text">
|
||||||
{{ issue.description }}
|
{{ issue.description }}
|
||||||
</p>
|
</p>
|
||||||
|
<!-- Show attachment if existing -->
|
||||||
|
<p v-if="issue.attachments" class="project-item-text">
|
||||||
|
<div class="project-issue-container" v-for="(attachment, issue_index) in issue.attachments"
|
||||||
|
:key="issue_index" :id="'project-issue-' + issue_index">
|
||||||
|
<button class="btn btn-link"
|
||||||
|
@click="downloadAttachedFile(issue.id, attachment.document_id, attachment.file_name)">
|
||||||
|
{{ $t('Download') }} {{ attachment.file_name }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
<!-- Ending of showing attachment if existing -->
|
||||||
<div v-if="updatingIssue && updatingIssue.issue_id === issue.id"
|
<div v-if="updatingIssue && updatingIssue.issue_id === issue.id"
|
||||||
class="project-issue-description-container">
|
class="project-issue-description-container">
|
||||||
<div class="project-issue-description">
|
<div class="project-issue-description">
|
||||||
@ -196,6 +207,26 @@ export default {
|
|||||||
this.mnx_backendErrorHandler(error)
|
this.mnx_backendErrorHandler(error)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
downloadAttachedFile(request_id, document_id, file_name) {
|
||||||
|
WorksapceApi.fetchAttachedFileAsDownload(request_id, document_id)
|
||||||
|
.then((response) => {
|
||||||
|
console.log('resposne', response)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
console.log('this is link', link)
|
||||||
|
link.href = response.data.download_url
|
||||||
|
link.download = file_name
|
||||||
|
link.target = '_blank'
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
|
||||||
|
// clean up "a" element & remove ObjectURL
|
||||||
|
document.body.removeChild(link)
|
||||||
|
// URL.revokeObjectURL(href) //TODO: navigate to the preview page
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.mnx_backendErrorHandler(error)
|
||||||
|
})
|
||||||
|
},
|
||||||
isOngoingProject(project) {
|
isOngoingProject(project) {
|
||||||
return project.status == projectStatusEnum.ONGOING
|
return project.status == projectStatusEnum.ONGOING
|
||||||
},
|
},
|
||||||
@ -249,7 +280,9 @@ export default {
|
|||||||
fdata.append('issue_id', this.updatingIssue.issue_id)
|
fdata.append('issue_id', this.updatingIssue.issue_id)
|
||||||
fdata.append('issue_title', this.updatingIssue.issue_title)
|
fdata.append('issue_title', this.updatingIssue.issue_title)
|
||||||
fdata.append('issue_description', this.updatingIssue.issue_description)
|
fdata.append('issue_description', this.updatingIssue.issue_description)
|
||||||
|
if (this.updatingIssue.issue_attachment != null) {
|
||||||
fdata.append('issue_attachment', this.updatingIssue.issue_attachment)
|
fdata.append('issue_attachment', this.updatingIssue.issue_attachment)
|
||||||
|
}
|
||||||
WorksapceApi.updateIssueForProduct(fdata)
|
WorksapceApi.updateIssueForProduct(fdata)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// this.$refs.issueBtn.blur()
|
// this.$refs.issueBtn.blur()
|
||||||
|
|||||||
@ -1,26 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="request-issue-container offcanvas-parent">
|
<div class="request-issue-container offcanvas-parent">
|
||||||
<div class="offcanvas offcanvas-end offcanvas-container" tabindex="-1" id="offcanvas-copy-existing"
|
<div
|
||||||
aria-labelledby="offcanvas-copy-existing">
|
class="offcanvas offcanvas-end offcanvas-container"
|
||||||
|
tabindex="-1"
|
||||||
|
id="offcanvas-copy-existing"
|
||||||
|
aria-labelledby="offcanvas-copy-existing"
|
||||||
|
>
|
||||||
<div class="offcanvas-header">
|
<div class="offcanvas-header">
|
||||||
<h5 class="offcanvas-title" id="offcanvas-copy-existing">
|
<h5 class="offcanvas-title" id="offcanvas-copy-existing">
|
||||||
{{ $t('Copy from existing request') }}
|
{{ $t('Copy from existing request') }}
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-close"
|
||||||
|
data-bs-dismiss="offcanvas"
|
||||||
|
aria-label="Close"
|
||||||
|
></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="offcanvas-body">
|
<div class="offcanvas-body">
|
||||||
<div class="accordion" id="existing-request-item-container">
|
<div class="accordion" id="existing-request-item-container">
|
||||||
<div v-for="(existingRequest, index) in existingRequests" :key="index" :id="'existing-request' + index"
|
<div
|
||||||
class="accordion-item">
|
v-for="(existingRequest, index) in existingRequests"
|
||||||
|
:key="index"
|
||||||
|
:id="'existing-request' + index"
|
||||||
|
class="accordion-item"
|
||||||
|
>
|
||||||
<h2 class="accordion-header" :id="'existing-heading' + index">
|
<h2 class="accordion-header" :id="'existing-heading' + index">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
:data-bs-target="'#' + 'existing-request-collapse' + index" aria-expanded="false"
|
class="accordion-button collapsed"
|
||||||
:aria-controls="'collapse' + index">
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
:data-bs-target="'#' + 'existing-request-collapse' + index"
|
||||||
|
aria-expanded="false"
|
||||||
|
:aria-controls="'collapse' + index"
|
||||||
|
>
|
||||||
<span class="dashed-container">{{ existingRequest.title }}</span>
|
<span class="dashed-container">{{ existingRequest.title }}</span>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div :id="'existing-request-collapse' + index" class="accordion-collapse collapse"
|
<div
|
||||||
:aria-labelledby="'existing-heading' + index" data-bs-parent="#existing-request-item-container">
|
:id="'existing-request-collapse' + index"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
:aria-labelledby="'existing-heading' + index"
|
||||||
|
data-bs-parent="#existing-request-item-container"
|
||||||
|
>
|
||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
<button class="copy-existing-button" @click="copyRequest(existingRequest)">
|
<button class="copy-existing-button" @click="copyRequest(existingRequest)">
|
||||||
{{ $t('Choose') }}
|
{{ $t('Choose') }}
|
||||||
@ -32,26 +54,52 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="offcanvas offcanvas-end offcanvas-container" tabindex="-1" id="offcanvas-template"
|
<div
|
||||||
aria-labelledby="offcanvas-template">
|
class="offcanvas offcanvas-end offcanvas-container"
|
||||||
|
tabindex="-1"
|
||||||
|
id="offcanvas-template"
|
||||||
|
aria-labelledby="offcanvas-template"
|
||||||
|
>
|
||||||
<div class="offcanvas-header">
|
<div class="offcanvas-header">
|
||||||
<h5 class="offcanvas-title" id="offcanvas-template">{{ $t('Apply request template') }}</h5>
|
<h5 class="offcanvas-title" id="offcanvas-template">{{ $t('Apply request template') }}</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-close"
|
||||||
|
data-bs-dismiss="offcanvas"
|
||||||
|
aria-label="Close"
|
||||||
|
></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="offcanvas-body">
|
<div class="offcanvas-body">
|
||||||
<div class="accordion" id="template-item-container">
|
<div class="accordion" id="template-item-container">
|
||||||
<div v-for="(template, index) in availableTemplates" :key="index" :id="'template' + index"
|
<div
|
||||||
class="accordion-item">
|
v-for="(template, index) in availableTemplates"
|
||||||
|
:key="index"
|
||||||
|
:id="'template' + index"
|
||||||
|
class="accordion-item"
|
||||||
|
>
|
||||||
<h2 class="accordion-header" :id="'heading' + index">
|
<h2 class="accordion-header" :id="'heading' + index">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<button
|
||||||
:data-bs-target="'#' + 'collapse' + index" aria-expanded="false" :aria-controls="'collapse' + index">
|
class="accordion-button collapsed"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
:data-bs-target="'#' + 'collapse' + index"
|
||||||
|
aria-expanded="false"
|
||||||
|
:aria-controls="'collapse' + index"
|
||||||
|
>
|
||||||
<span class="dashed-container">{{ template.title }}</span>
|
<span class="dashed-container">{{ template.title }}</span>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div :id="'collapse' + index" class="accordion-collapse collapse" :aria-labelledby="'heading' + index"
|
<div
|
||||||
data-bs-parent="#template-item-container">
|
:id="'collapse' + index"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
:aria-labelledby="'heading' + index"
|
||||||
|
data-bs-parent="#template-item-container"
|
||||||
|
>
|
||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
<button class="select-template-button btn btn-link" @click="selectTemplate(template)">
|
<button
|
||||||
|
class="select-template-button btn btn-link"
|
||||||
|
@click="selectTemplate(template)"
|
||||||
|
>
|
||||||
{{ $t('Apply') }}
|
{{ $t('Apply') }}
|
||||||
</button>
|
</button>
|
||||||
<div class="template-content-textarea" v-html="template.content"></div>
|
<div class="template-content-textarea" v-html="template.content"></div>
|
||||||
@ -62,23 +110,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-bar">
|
<div class="action-bar">
|
||||||
<input-selector :select-list="products" :selected="selectedProduct" @selectedChange="selectedChange" />
|
<input-selector
|
||||||
|
:select-list="products"
|
||||||
|
:selected="selectedProduct"
|
||||||
|
@selectedChange="selectedChange"
|
||||||
|
/>
|
||||||
<div class="upload-contianer">
|
<div class="upload-contianer">
|
||||||
<label class="btn btn-link">
|
<label class="btn btn-link">
|
||||||
<span v-if="!uploadFile">{{ $t('Upload file') }}</span>
|
<span v-if="!uploadFile">{{ $t('Upload file') }}</span>
|
||||||
<span v-if="uploadFile">{{ uploadFile.name }}</span>
|
<span v-if="uploadFile">{{ uploadFile.name }}</span>
|
||||||
<input type="file" hidden @change="handleFileUpload" />
|
<input type="file" hidden @change="handleFileUpload" />
|
||||||
</label>
|
</label>
|
||||||
<svg-icon v-if="uploadFile" icon="delete" class-name="delete-icon" @click.stop="clearFile" />
|
<svg-icon
|
||||||
|
v-if="uploadFile"
|
||||||
|
icon="delete"
|
||||||
|
class-name="delete-icon"
|
||||||
|
@click.stop="clearFile"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1" />
|
<div class="flex-1" />
|
||||||
<button class="action-button btn btn-link" type="button" data-bs-toggle="offcanvas"
|
<button
|
||||||
data-bs-target="#offcanvas-template" aria-controls="offcanvas-template">
|
class="action-button btn btn-link"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="offcanvas"
|
||||||
|
data-bs-target="#offcanvas-template"
|
||||||
|
aria-controls="offcanvas-template"
|
||||||
|
>
|
||||||
<svg-icon icon="btn-templates" />
|
<svg-icon icon="btn-templates" />
|
||||||
{{ $t('Templates') }}
|
{{ $t('Templates') }}
|
||||||
</button>
|
</button>
|
||||||
<button class="action-button btn btn-link" type="button" data-bs-toggle="offcanvas"
|
<button
|
||||||
data-bs-target="#offcanvas-copy-existing" aria-controls="offcanvas-copy-existing">
|
class="action-button btn btn-link"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="offcanvas"
|
||||||
|
data-bs-target="#offcanvas-copy-existing"
|
||||||
|
aria-controls="offcanvas-copy-existing"
|
||||||
|
>
|
||||||
<svg-icon icon="btn-history" />
|
<svg-icon icon="btn-history" />
|
||||||
{{ $t('Copy') }}
|
{{ $t('Copy') }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -56,7 +56,9 @@ const convertIntoToMilestoneStatus = function (i) {
|
|||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return milestoneStatusEnum.DONE
|
return Object.keys(milestoneStatusEnum).find(
|
||||||
|
(key) => milestoneStatusEnum[key] === milestoneStatusEnum.DONE
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const convertIntoToProjectIssueStatus = function (i) {
|
const convertIntoToProjectIssueStatus = function (i) {
|
||||||
|
|||||||
@ -1,7 +1,78 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import { jwtDecode } from 'jwt-decode'
|
||||||
|
|
||||||
const backendAxios = axios.create({
|
const backendAxios = axios.create({
|
||||||
baseURL: ''
|
baseURL: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Function to check if the token has expired
|
||||||
|
function isTokenExpired(token) {
|
||||||
|
// Ensure token is a non-empty string
|
||||||
|
if (!token || typeof token !== 'string') {
|
||||||
|
console.error('Invalid token: must be a non-empty string')
|
||||||
|
return true // Treat it as expired
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const decodedToken = jwtDecode(token)
|
||||||
|
const now = Math.floor(Date.now() / 1000)
|
||||||
|
// Buffer as 5 minu = 300 seconds
|
||||||
|
return decodedToken.exp - 300 < now
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error decoding token:', error)
|
||||||
|
return true // Treat it as expired if decoding fails
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interceptor for handling token expiration and refreshing
|
||||||
|
backendAxios.interceptors.request.use(
|
||||||
|
async (config) => {
|
||||||
|
let accessToken = localStorage.getItem('access_token')
|
||||||
|
let refreshToken = localStorage.getItem('refresh_token')
|
||||||
|
// Fix: handle the case where localStorage returns 'null' as a string
|
||||||
|
if (accessToken === 'null') accessToken = null
|
||||||
|
if (refreshToken === 'null') refreshToken = null
|
||||||
|
|
||||||
|
// Check if the access token is expired
|
||||||
|
if (accessToken == null || refreshToken == null) {
|
||||||
|
return config
|
||||||
|
}
|
||||||
|
if (isTokenExpired(accessToken)) {
|
||||||
|
try {
|
||||||
|
// If access token is expired, refresh it using the refresh token
|
||||||
|
const response = await axios.post(
|
||||||
|
'/api/user/signin/refresh-token',
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${refreshToken}`,
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
accessToken = response.data.access_token
|
||||||
|
refreshToken = response.data.refresh_token
|
||||||
|
|
||||||
|
// Save the new access token to localStorage
|
||||||
|
localStorage.setItem('access_token', accessToken)
|
||||||
|
localStorage.setItem('refresh_token', refreshToken)
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Token refresh failed. Redirecting to login.')
|
||||||
|
// Optionally, handle token refresh failure (e.g., redirect to login)
|
||||||
|
window.location.href = '/front-door'
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the (new) access token to the request headers
|
||||||
|
if (accessToken) {
|
||||||
|
config.headers.Authorization = `Bearer ${accessToken}`
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
export { backendAxios }
|
export { backendAxios }
|
||||||
|
|||||||
@ -81,6 +81,33 @@ class WorksapceApi {
|
|||||||
return request
|
return request
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static createZoomCall(zoom_access_token) {
|
||||||
|
let jwt = userUtils.getJwtToken() // Assuming you have a method to fetch the JWT token
|
||||||
|
|
||||||
|
// Make the POST request using backendAxios, with the Authorization header
|
||||||
|
try {
|
||||||
|
// Make the POST request using backendAxios, with the Authorization header
|
||||||
|
const response = backendAxios.post(
|
||||||
|
'/api/messages/trigger-video-call', // Your backend API for creating Zoom calls
|
||||||
|
{
|
||||||
|
token: zoom_access_token,
|
||||||
|
participants: ['freeleaps@gmail.com'] // Sending participants as an array of email addresses
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: { Authorization: `Bearer ${jwt}` }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// Handle the response and update the meeting link
|
||||||
|
const result = response.data // Axios puts the response data in 'data'
|
||||||
|
document.getElementById('meeting-link').textContent =
|
||||||
|
`Join Zoom meeting: ${result.meeting_url}`
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to create Zoom call:', error)
|
||||||
|
document.getElementById('meeting-link').textContent = 'Failed to create Zoom meeting.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static fetchProject(project_id) {
|
static fetchProject(project_id) {
|
||||||
let jwt = userUtils.getJwtToken()
|
let jwt = userUtils.getJwtToken()
|
||||||
const request = backendAxios.post(
|
const request = backendAxios.post(
|
||||||
|
|||||||
0
start_frontend.sh
Normal file → Executable file
0
start_frontend.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user