eli-video-interview 1.2.41-alpha.12 → 1.2.41-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,14 +23,13 @@ import { useAiReportStore } from "../../store/ai-report/global-store";
|
|
|
23
23
|
import { useRequest } from 'ahooks';
|
|
24
24
|
import { Box, Button, confirm, Message, Paper, Typography } from 'fbm-ui';
|
|
25
25
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
26
|
-
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
26
|
+
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER, FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
|
|
27
27
|
var AiReportRoot = forwardRef(function (props, ref) {
|
|
28
28
|
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
29
29
|
var firstLoad = useRef(true);
|
|
30
30
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
31
|
-
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e;
|
|
32
|
-
|
|
33
|
-
var _f = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
31
|
+
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f;
|
|
32
|
+
var _g = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
34
33
|
manual: true,
|
|
35
34
|
onSuccess: function (_a) {
|
|
36
35
|
var list = _a.data.list;
|
|
@@ -48,7 +47,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
48
47
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
|
-
}), data =
|
|
50
|
+
}), data = _g.data, loading = _g.loading, postAiInterviewResult = _g.run;
|
|
52
51
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
53
52
|
var handleRefreshSuccess = useCallback(function () {
|
|
54
53
|
postAiInterviewResult();
|
|
@@ -66,7 +65,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
66
65
|
Message.error('升级报告失败,请重试。');
|
|
67
66
|
});
|
|
68
67
|
};
|
|
69
|
-
if (model === 'standard') {
|
|
68
|
+
if (model === 'standard' && !hasProVersion) {
|
|
70
69
|
confirm({
|
|
71
70
|
title: '确认使用增值服务',
|
|
72
71
|
content: (_jsxs(Typography, __assign({ color: "textSecondary", sx: { display: 'inline' } }, { children: ["\u4E13\u4E1A\u7248\u62A5\u544A\u4EE5\u9AD8\u7EA7AI\u6280\u672F\u63D0\u4F9B\u66F4\u7CBE\u51C6\u8BC4\u4F30\uFF0C\u5C5E\u589E\u503C\u4EA7\u54C1\uFF0C\u6BCF\u4E13\u4E1A\u7248\u62A5\u544A\u6309\u6807\u51C6\u72482\u4EBA\u6B21\u8BA1\u8D39\uFF0C\u4EC5\u9996\u6B21\u5207\u6362\u6536\u8D39\u3002\u9ED8\u8BA4\u63D0\u4F9B\u6807\u51C6\u7248\uFF0C\u54A8\u8BE2\u5BA2\u6237\u987E\u95EE\u4E86\u89E3\u8D44\u8D39\u4F18\u60E0\u3002", _jsx(Typography, __assign({ fontWeight: "medium", sx: { display: 'inline' } }, { children: "\u672C\u6B21\u64CD\u4F5C\u5C06\u6D88\u80172\u4EBA \u6B21\uFF0C\u662F\u5426\u786E\u8BA4\uFF1F" }))] }))),
|
|
@@ -103,7 +102,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
103
102
|
return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: { marginTop: '2px' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
104
103
|
}
|
|
105
104
|
else {
|
|
106
|
-
return (_jsxs(Box, __assign({ pb: 3 }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), _jsxs(Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [_jsx(Report, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }))] })));
|
|
105
|
+
return (_jsxs(Box, __assign({ pb: 3 }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), _jsxs(Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && _jsx(Report, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }))] })));
|
|
107
106
|
}
|
|
108
107
|
}, [
|
|
109
108
|
status,
|
|
@@ -28,14 +28,13 @@ var global_store_1 = require("../../store/ai-report/global-store");
|
|
|
28
28
|
var ahooks_1 = require("ahooks");
|
|
29
29
|
var fbm_ui_1 = require("fbm-ui");
|
|
30
30
|
var react_1 = require("react");
|
|
31
|
-
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
|
|
31
|
+
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER, FAILED = ai_report_1.INTERVIEW_STATUS.FAILED, IN_CALCULATION = ai_report_1.INTERVIEW_STATUS.IN_CALCULATION;
|
|
32
32
|
var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
33
33
|
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
34
34
|
var firstLoad = (0, react_1.useRef)(true);
|
|
35
35
|
var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
36
|
-
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e;
|
|
37
|
-
|
|
38
|
-
var _f = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
|
|
36
|
+
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f;
|
|
37
|
+
var _g = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
|
|
39
38
|
manual: true,
|
|
40
39
|
onSuccess: function (_a) {
|
|
41
40
|
var list = _a.data.list;
|
|
@@ -53,7 +52,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
53
52
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
54
53
|
}
|
|
55
54
|
},
|
|
56
|
-
}), data =
|
|
55
|
+
}), data = _g.data, loading = _g.loading, postAiInterviewResult = _g.run;
|
|
57
56
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
58
57
|
var handleRefreshSuccess = (0, react_1.useCallback)(function () {
|
|
59
58
|
postAiInterviewResult();
|
|
@@ -71,7 +70,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
71
70
|
fbm_ui_1.Message.error('升级报告失败,请重试。');
|
|
72
71
|
});
|
|
73
72
|
};
|
|
74
|
-
if (model === 'standard') {
|
|
73
|
+
if (model === 'standard' && !hasProVersion) {
|
|
75
74
|
(0, fbm_ui_1.confirm)({
|
|
76
75
|
title: '确认使用增值服务',
|
|
77
76
|
content: ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: "textSecondary", sx: { display: 'inline' } }, { children: ["\u4E13\u4E1A\u7248\u62A5\u544A\u4EE5\u9AD8\u7EA7AI\u6280\u672F\u63D0\u4F9B\u66F4\u7CBE\u51C6\u8BC4\u4F30\uFF0C\u5C5E\u589E\u503C\u4EA7\u54C1\uFF0C\u6BCF\u4E13\u4E1A\u7248\u62A5\u544A\u6309\u6807\u51C6\u72482\u4EBA\u6B21\u8BA1\u8D39\uFF0C\u4EC5\u9996\u6B21\u5207\u6362\u6536\u8D39\u3002\u9ED8\u8BA4\u63D0\u4F9B\u6807\u51C6\u7248\uFF0C\u54A8\u8BE2\u5BA2\u6237\u987E\u95EE\u4E86\u89E3\u8D44\u8D39\u4F18\u60E0\u3002", (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontWeight: "medium", sx: { display: 'inline' } }, { children: "\u672C\u6B21\u64CD\u4F5C\u5C06\u6D88\u80172\u4EBA \u6B21\uFF0C\u662F\u5426\u786E\u8BA4\uFF1F" }))] }))),
|
|
@@ -108,7 +107,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
108
107
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
109
108
|
}
|
|
110
109
|
else {
|
|
111
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3 }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [(0, jsx_runtime_1.jsx)(Report_1.default, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }))] })));
|
|
110
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3 }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && (0, jsx_runtime_1.jsx)(Report_1.default, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }))] })));
|
|
112
111
|
}
|
|
113
112
|
}, [
|
|
114
113
|
status,
|