This commit is contained in:
@@ -2,6 +2,7 @@ const employeesApi = require('../../api/employees')
|
||||
const { chooseImageFilePath, uploadObjectFile } = require('../../utils/upload')
|
||||
const { showErrorToast, toUserMessage } = require('../../utils/toast')
|
||||
const { showActionModal } = require('../../utils/action-modal')
|
||||
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
||||
|
||||
const EMPLOYEE_COLORS = ['#7BA7C7', '#8FB89A', '#A894C7', '#D7A86E', '#D98DA5', '#79A6A3', '#B9A16B', '#9BA9C8']
|
||||
const COLOR_WHEEL_RADIUS = 110
|
||||
@@ -313,6 +314,7 @@ Page({
|
||||
avatar: form.avatar || undefined
|
||||
})
|
||||
const id = saved && typeof saved === 'object' ? (saved.userId || saved.id) : this.data.selectedWechatUserId
|
||||
markPlanningRefresh()
|
||||
this.setData({
|
||||
createdEmployee: { id, name: nickname, title: nickname, avatar: form.avatar || '' },
|
||||
applicationApproved: false
|
||||
@@ -348,6 +350,7 @@ Page({
|
||||
}
|
||||
const result = await employeesApi.createUser(payload)
|
||||
const id = result && typeof result === 'object' ? (result.id || result.userId) : result
|
||||
markPlanningRefresh()
|
||||
const employee = { id, name: nickname, title: nickname, avatar: form.avatar || '' }
|
||||
this.setData({ createdEmployee: employee, applicationApproved: false })
|
||||
if (this.data.applicationId) {
|
||||
|
||||
Reference in New Issue
Block a user