refactor: Report

feature/price_manager
Lei OT 1 year ago
parent 6e66a31bb0
commit 5b30aec3e5

@ -85,7 +85,6 @@ const useFeedbackStore = create(
...initialState, ...initialState,
reset: () => set(initialState), reset: () => set(initialState),
setState: (state) => set(state),
setLoading: (loading) => set({ loading }), setLoading: (loading) => set({ loading }),
setFeedbackList: (feedbackList) => set({ feedbackList }), setFeedbackList: (feedbackList) => set({ feedbackList }),

@ -1,113 +1,69 @@
import { makeAutoObservable, runInAction } from "mobx"; import { fetchJSON } from "@/utils/request";
import { fetchJSON, postForm } from "@/utils/request";
import { prepareUrl, isNotEmpty } from "@/utils/commons";
import { HT_HOST } from "@/config"; import { HT_HOST } from "@/config";
import { json } from "react-router-dom"; import { create } from 'zustand';
import * as config from "@/config"; import { devtools } from 'zustand/middleware';
import dayjs from "dayjs";
class Report { const initialState = {
constructor(root) { loading: false,
makeAutoObservable(this, { rootStore: false }); vendorScoresData: [], //地接统计数据集,合计数据,每月数据,地接考核分数
this.root = root; productScoresData: [], //产品体验分析 常用酒店分析, 导游接待情况
} commendScoresData: [], //表扬情况, 投诉情况, 评建议
vendorScoresData = []; //地接统计数据集,合计数据,每月数据,地接考核分数
productScoresData = []; //产品体验分析 常用酒店分析, 导游接待情况
commendScoresData = []; //表扬情况, 投诉情况, 评建议
loading = false;
search_date_start = dayjs().month(0).startOf("month");
search_date_end = dayjs().month(11).endOf("month");
onDateRangeChange = dates => {
this.search_date_start = dates == null ? null : dates[0].startOf("month");
this.search_date_end = dates == null ? null : dates[1].endOf("month");
}; };
export const useReportStore = create(
devtools((set, get) => ({
...initialState,
reset: () => set(initialState),
getHWVendorScores(VEI_SN, StartDate, EndDate) { setLoading: (loading) => set({ loading }),
this.loading = true; setVendorScoresData: (vendorScoresData) => set({ vendorScoresData }),
const fetchUrl = prepareUrl(HT_HOST +"/service-cusservice/PTGetHWVendorScores") setProductScoresData: (productScoresData) => set({ productScoresData }),
.append("VEI_SN", VEI_SN) setCommendScoresData: (commendScoresData) => set({ commendScoresData }),
.append("StartDate", StartDate)
.append("EndDate", EndDate)
.append("StrDEI_SN", "(,-1,)")
.append("OrderType", "-1")
.append("GroupType", "-1")
.append("token", this.root.authStore.login.token)
.build();
return fetchJSON(fetchUrl).then(json => {
runInAction(() => {
this.loading = false;
if (json.errcode == 0) {
if (isNotEmpty(json)) {
this.vendorScoresData = json;
} else {
this.vendorScoresData = [];
}
} else {
throw new Error(json.errmsg + ": " + json.errcode);
}
});
});
}
getHWProductScores(VEI_SN, StartDate, EndDate) {
this.loading = true;
const fetchUrl = prepareUrl(HT_HOST +"/service-cusservice/PTGetHWProductScores")
.append("VEI_SN", VEI_SN)
.append("StartDate", StartDate)
.append("EndDate", EndDate)
.append("StrDEI_SN", "(,-1,)")
.append("OrderType", "-1")
.append("GroupType", "-1")
.append("token", this.root.authStore.login.token)
.build();
return fetchJSON(fetchUrl).then(json => {
runInAction(() => {
this.loading = false;
if (json.errcode == 0) {
if (isNotEmpty(json)) {
this.productScoresData = json;
} else {
this.productScoresData = [];
}
} else {
throw new Error(json.errmsg + ": " + json.errcode);
}
});
});
}
getHWCommendScores(VEI_SN, StartDate, EndDate) { async getHWVendorScores(VEI_SN, StartDate, EndDate) {
this.loading = true; const { setLoading, setVendorScoresData } = get();
const fetchUrl = prepareUrl(HT_HOST +"/service-cusservice/PTGetHWCommendScores") setLoading(true);
.append("VEI_SN", VEI_SN) const searchParams = {
.append("StartDate", StartDate) VEI_SN,
.append("EndDate", EndDate) StartDate,
.append("StrDEI_SN", "(,-1,)") EndDate,
.append("OrderType", "-1") StrDEI_SN: '(,-1,)',
.append("GroupType", "-1") OrderType: '-1',
.append("token", this.root.authStore.login.token) GroupType: '-1',
.build(); };
const { errcode, ...Result } = await fetchJSON(`${HT_HOST}/service-cusservice/PTGetHWVendorScores`, searchParams);
return fetchJSON(fetchUrl).then(json => { setVendorScoresData(errcode === 0 ? Result : {});
runInAction(() => { setLoading(false);
this.loading = false; },
if (json.errcode == 0) { async getHWProductScores(VEI_SN, StartDate, EndDate) {
if (isNotEmpty(json)) { const { setLoading, setProductScoresData } = get();
this.commendScoresData = json; setLoading(true);
} else { const searchParams = {
this.commendScoresData = []; VEI_SN,
} StartDate,
} else { EndDate,
throw new Error(json.errmsg + ": " + json.errcode); StrDEI_SN: '(,-1,)',
} OrderType: '-1',
}); GroupType: '-1',
}); };
} const { errcode, ...Result } = await fetchJSON(`${HT_HOST}/service-cusservice/PTGetHWProductScores`, searchParams);
} setProductScoresData(errcode === 0 ? Result : {});
setLoading(false);
export default Report; },
async getHWCommendScores(VEI_SN, StartDate, EndDate) {
const { setLoading, setCommendScoresData } = get();
setLoading(true);
const searchParams = {
VEI_SN,
StartDate,
EndDate,
StrDEI_SN: '(,-1,)',
OrderType: '-1',
GroupType: '-1',
};
const { errcode, ...Result } = await fetchJSON(`${HT_HOST}/service-cusservice/PTGetHWCommendScores`, searchParams);
setCommendScoresData(errcode === 0 ? Result : {});
setLoading(false);
},
}))
);
export default useReportStore;

@ -2,14 +2,12 @@ import { makeAutoObservable } from "mobx";
import { Reservation } from "./Reservation"; import { Reservation } from "./Reservation";
import { Auth } from "./Auth"; import { Auth } from "./Auth";
import {Invoice} from "./Invoice"; import {Invoice} from "./Invoice";
import Report from "./Report";
class Root { class Root {
constructor() { constructor() {
this.reservationStore = new Reservation(this); this.reservationStore = new Reservation(this);
this.authStore = new Auth(this); this.authStore = new Auth(this);
this.invoiceStore = new Invoice(this); this.invoiceStore = new Invoice(this);
this.reportStore = new Report(this);
makeAutoObservable(this); makeAutoObservable(this);
} }

@ -1,411 +1,346 @@
import { useEffect } from "react"; import { Row, Col, Space, Button, Table, Divider, Typography } from 'antd';
import { observer } from "mobx-react"; import * as comm from '@/utils/commons';
import { Row, Col, Space, Button, Table, Divider, Typography, DatePicker } from "antd"; import { usePDF } from 'react-to-pdf';
import { useStore } from "@/stores/StoreContext.js"; import dayjs from 'dayjs';
import * as config from "@/config"; import SearchForm from '@/components/SearchForm';
import * as comm from "@/utils/commons"; import useAuthStore from '@/stores/Auth';
import { usePDF } from "react-to-pdf"; import useReportStore from '@/stores/Report';
function Index() { function Index() {
const { reportStore, authStore } = useStore();
const { search_date_start, search_date_end, vendorScoresData, productScoresData, commendScoresData } = reportStore; const [travelAgencyId, ] = useAuthStore((state) => [state.loginUser.travelAgencyId]);
const [vendorScoresData, getHWVendorScores] = useReportStore((state) => [state.vendorScoresData, state.getHWVendorScores]);
const [productScoresData, getHWProductScores] = useReportStore((state) => [state.productScoresData, state.getHWProductScores]);
const [commendScoresData, getHWCommendScores] = useReportStore((state) => [state.commendScoresData, state.getHWCommendScores]);
const evaluationScores = vendorScoresData.EvaluationScores ? vendorScoresData.EvaluationScores[0] : []; const evaluationScores = vendorScoresData.EvaluationScores ? vendorScoresData.EvaluationScores[0] : [];
useEffect(() => {}, []); const primaryData = vendorScoresData.EvaluationScores
? [comm.pick(vendorScoresData.EvaluationScores[0], ['Groups', 'PersonNum', 'AmountUSD', 'EvaluationScore', 'TPReviews', 'TPReviewRate', 'Complaints', 'ComplaintRate'])]
: [];
const evaluationScoresData = [
{ category: 'DMC Services', item: 'Guide', value: evaluationScores.FRTGuide, note: evaluationScores.FRTText },
{ category: 'DMC Services', item: 'Driver & Vehicle', value: evaluationScores.FRTGriver },
{ category: 'DMC Services', item: 'Food Arrangement', value: evaluationScores.FRTMeal },
{ category: 'DMC Services', item: 'Activity', value: evaluationScores.FRTProduct },
{ category: 'Itinerary Arrangements', item: 'Hotel', value: evaluationScores.FRTHotel, },
{ category: 'Itinerary Arrangements', item: 'Travel Advisor’s Planning', value: evaluationScores.FRTAdvisor },
];
const columns_evaluation = [
{ title: 'Category', dataIndex: 'category', key: 'category',align: 'center', onCell: (_, index) => ({ rowSpan: index === 0 ? 4 : index === 4 ? 2 : 0 }) },
{ title: 'Item', dataIndex: 'item', key: 'item', align: 'center' },
{ title: 'Your Scores', dataIndex: 'value', key: 'value',align: 'center', },
{ title: 'Note', dataIndex: 'note', key: 'note',align: 'center', onCell: (_, index) => ({ rowSpan: index === 0 ? 7 : 0 })},
];
const columns_DMC_customer_satisfaction = [
{ title: 'Customer Satisfaction', dataIndex: 'item', key: 'item',align: 'center', },
{ title: '3 scores', dataIndex: 'stand_3', key: 'stand_3', align: 'center', onCell: (_, index) => ({ colSpan: (index === 2 || index===4) ? 3 : 1 }) },
{ title: '4 scores', dataIndex: 'stand_4', key: 'stand_4',align: 'center',onCell: (_, index) => ({ colSpan: (index === 2 || index===4) ? 0 : 1 }) },
{ title: '5 scores', dataIndex: 'stand_5', key: 'stand_5',align: 'center',onCell: (_, index) => ({ colSpan: (index === 2 || index===4) ? 0 : 1 }) },
{ title: 'Your Scores', dataIndex: 'value', key: 'value',align: 'center', },
{ title: 'Final Scores', dataIndex: 'final_score', key: 'final_score',align: 'center', onCell: (_, index) => ({ rowSpan: index === 0 ? 5 : 0 })},
{ title: 'Note', dataIndex: 'note', key: 'note',align: 'center', },
];
const DMCData_customer_satisfaction = [
{
item: 'TP review rating',
stand_3: '\\',
stand_4: '30%',
stand_5: '60%',
value: evaluationScores.TPReviewRating,
final_score: evaluationScores.AvgCusSatisfaction,
note: evaluationScores.AvgCusSatisfaction,
},
{
item: 'Post tour complaints',
stand_3: '1',
stand_4: '0',
stand_5: '0',
value: evaluationScores.PostTourComplaints,
// final_score: evaluationScores.AvgCusSatisfaction,
note: evaluationScores.PostTourComplaintsText,
},
{
item: 'Complaints resolved during the tour',
stand_3: '3',
// stand_4: '0',
// stand_5: '0',
value: evaluationScores.ComplaintsDuringTour,
note: evaluationScores.ComplaintsDuringTourText,
},
{ item: 'Customer photos', stand_3: '\\', stand_4: '30%', stand_5: '50%', value: evaluationScores.CustomerPhotoRate, note: evaluationScores.CustomerPhotoRateText },
{ item: 'Evaluation scores', stand_3: '4.5', value: evaluationScores.EvaluationFormScore, note: evaluationScores.EvaluationFormScoreText },
];
const columns_month = [ const columns_DMC_sopport_local = [
{ title: 'Operator Support & Local resources', dataIndex: 'item', key: 'item',align: 'center', },
{ title: '3 scores', dataIndex: 'stand_3', key: 'stand_3', align: 'center', },
{ title: '4 scores', dataIndex: 'stand_4', key: 'stand_4',align: 'center', },
{ title: '5 scores', dataIndex: 'stand_5', key: 'stand_5',align: 'center', },
{ title: 'Your Scores', dataIndex: 'value', key: 'value',align: 'center', },
{ title: 'Final Scores', dataIndex: 'final_score', key: 'final_score',align: 'center', onCell: (_, index) => ({ rowSpan: index === 0 ? 6 : 0 })},
{ title: 'Note', dataIndex: 'note', key: 'note',align: 'center', },
];
const DMCData_sopport_local = [
{
item: 'Response efficiency',
stand_3: '1d',
stand_4: '6hrs',
stand_5: '3hrs',
value: evaluationScores.ResponseEfficiency,
final_score: evaluationScores.AvgLocalResources,
note: evaluationScores.ResponseEfficiencyText,
},
{
item: 'Provide suggestions and alternatives',
stand_3: '\\',
stand_4: '√',
stand_5: '√',
value: evaluationScores.ProvideSuggestions,
// final_score: evaluationScores.AvgCusSatisfaction,
note: evaluationScores.ProvideSuggestionsText,
},
{
item: 'Provide local tourism information',
stand_3: '\\',
stand_4: '√',
stand_5: '√',
value: evaluationScores.ProvideLocalInfo,
note: evaluationScores.ProvideLocalInfoText,
},
{ item: 'Assist in developing exclusive products',
stand_3: '\\',
stand_4: '\\',
stand_5: '√', value: evaluationScores.ExclusiveProducts, note: evaluationScores.ExclusiveProductsText },
{ item: 'Dedicated tour guide team for AH',
stand_3: '\\',
stand_4: '√',
stand_5: '√', value: evaluationScores.DedicatedTourGuide, note: evaluationScores.DedicatedTourGuideText },
{ item: 'Partner hotels with contracted rate',
stand_3: '\\',
stand_4: '√',
stand_5: '√', value: evaluationScores.PartnerHotels, note: evaluationScores.PartnerHotelsText },
];
const columns_DMC_pricing = [
{ title: 'Pricing & Settlement 20%', dataIndex: 'item', key: 'item',align: 'center', },
{ title: '3 scores', dataIndex: 'stand_3', key: 'stand_3', align: 'center', },
{ title: '4 scores', dataIndex: 'stand_4', key: 'stand_4',align: 'center', },
{ title: '5 scores', dataIndex: 'stand_5', key: 'stand_5',align: 'center', },
{ title: 'Your Scores', dataIndex: 'value', key: 'value',align: 'center', },
{ title: 'Final Scores', dataIndex: 'final_score', key: 'final_score',align: 'center', onCell: (_, index) => ({ rowSpan: index === 0 ? 3 : 0 })},
{ title: 'Note', dataIndex: 'note', key: 'note',align: 'center', },
];
const DMCData_pricing = [
{
item: 'Quotation',
stand_3: 'Package',
stand_4: 'Day tours',
stand_5: 'Individual services',
value: evaluationScores.Quotation,
final_score: evaluationScores.AvgPricingAndSettlement,
note: evaluationScores.QuotationText,
},
{ {
title: "Date", item: 'Settlement',
dataIndex: "VMonth", stand_3: 'Prepayment',
key: "VMonth", stand_4: 'Monthly Prepayment',
stand_5: 'Monthly settlement after the tours',
value: evaluationScores.Settlement,
note: evaluationScores.SettlementText,
}, },
{ {
title: "Groups", item: 'Cancellation policy',
dataIndex: "Groups", stand_3: '30 days',
key: "Groups", stand_4: '21 days',
stand_5: '1 day',
value: evaluationScores.CancellationPolicy,
note: evaluationScores.CancellationPolicyText,
},];
const columns_primary = [
{
title: 'Groups',
dataIndex: 'Groups',
key: 'Groups',
}, },
{ {
title: "Number of People", title: 'Number of People',
dataIndex: "PersonNum", dataIndex: 'PersonNum',
key: "PersonNum", key: 'PersonNum',
}, },
{ {
title: "Transaction AmountUSD)", title: 'Transaction AmountUSD)',
dataIndex: "AmountUSD", dataIndex: 'AmountUSD',
key: "AmountUSD", key: 'AmountUSD',
render: value => comm.formatPrice(value), render: (value) => comm.formatPrice(value),
}, },
{ {
title: "Evaluation Score", title: 'Evaluation Score',
dataIndex: "EvaluationScore", dataIndex: 'EvaluationScore',
key: "EvaluationScore", key: 'EvaluationScore',
}, },
{ {
title: "TP Reviews", title: 'TP Reviews',
dataIndex: "TPReviews", dataIndex: 'TPReviews',
key: "TPReviews", key: 'TPReviews',
}, },
{ {
title: "TP Reviews Rate", title: 'TP Reviews Rate',
dataIndex: "TPReviewRate", dataIndex: 'TPReviewRate',
key: "TPReviewRate", key: 'TPReviewRate',
render: value => comm.formatPercent(value), render: (value) => comm.formatPercent(value),
}, },
{ {
title: "Complaints", title: 'Complaints',
dataIndex: "Complaints", dataIndex: 'Complaints',
key: "Complaints", key: 'Complaints',
}, },
{ {
title: "Complaint Rate", title: 'Complaint Rate',
dataIndex: "ComplaintRate", dataIndex: 'ComplaintRate',
key: "ComplaintRate", key: 'ComplaintRate',
render: value => comm.formatPercent(value), render: (value) => comm.formatPercent(value),
}, },
]; ];
const columns_month = [{ title: 'Date', dataIndex: 'VMonth', key: 'VMonth' }, ...columns_primary];
const columns_guide = [ const columns_guide = [
{ {
title: "Name", title: 'Name',
dataIndex: "TGI2_Name", dataIndex: 'TGI2_Name',
key: "TGI2_Name", key: 'TGI2_Name',
}, },
{ {
title: "Average Scores", title: 'Average Scores',
dataIndex: "VAverage", dataIndex: 'VAverage',
key: "VAverage", key: 'VAverage',
}, },
{ {
title: "Group Numbers", title: 'Group Numbers',
dataIndex: "ReceptionGroups", dataIndex: 'ReceptionGroups',
key: "ReceptionGroups", key: 'ReceptionGroups',
}, },
{ {
title: "TP Reviews", title: 'TP Reviews',
dataIndex: "CommendNum", dataIndex: 'CommendNum',
key: "CommendNum", key: 'CommendNum',
}, },
{ {
title: "TP Review Rate", title: 'TP Review Rate',
dataIndex: "CommendRate", dataIndex: 'CommendRate',
key: "CommendRate", key: 'CommendRate',
render: value => comm.formatPercent(value), render: (value) => comm.formatPercent(value),
}, },
{ {
title: "Complaints", title: 'Complaints',
dataIndex: "Complaints", dataIndex: 'Complaints',
key: "Complaints", key: 'Complaints',
}, },
{ {
title: "Complaint Rate", title: 'Complaint Rate',
dataIndex: "ComplaintRate", dataIndex: 'ComplaintRate',
key: "ComplaintRate", key: 'ComplaintRate',
render: value => comm.formatPercent(value), render: (value) => comm.formatPercent(value),
}, },
]; ];
const columns_commend = [ const columns_commend = [
{ {
title: "Reference Number", title: 'Reference Number',
dataIndex: "GRI_No", dataIndex: 'GRI_No',
key: "GRI_No", key: 'GRI_No',
}, },
{ {
title: "Tour Guides", title: 'Tour Guides',
dataIndex: "ObjectName", dataIndex: 'ObjectName',
key: "ObjectName", key: 'ObjectName',
}, },
{ {
title: "Essential Comments", title: 'Essential Comments',
dataIndex: "ECI_Content", dataIndex: 'ECI_Content',
key: "ECI_Content", key: 'ECI_Content',
}, },
]; ];
const { toPDF, targetRef } = usePDF({ const { toPDF, targetRef } = usePDF({
method: "save", method: 'save',
filename: "GHH-Report.pdf", filename: 'GHH-Report.pdf',
page: { margin: "3", format: "letter" }, //margin: Margin.SMALL, page: { margin: '3', format: 'letter' }, //margin: Margin.SMALL,
canvas: { mimeType: "image/jpeg", qualityRatio: 1 }, canvas: { mimeType: 'image/jpeg', qualityRatio: 1 },
overrides: { pdf: { compress: true }, canvas: { useCORS: true } }, overrides: { pdf: { compress: true }, canvas: { useCORS: true } },
}); });
return ( return (
<Space direction="vertical" style={{ width: "100%" }}> <Space direction='vertical' style={{ width: '100%' }}>
<Typography.Title level={3}></Typography.Title> {/* <Typography.Title level={3}></Typography.Title> */}
<Row gutter={16}> <Row gutter={16}>
<Col md={24} lg={8} xxl={6}> <Col md={24} lg={18} xxl={12}>
<Space direction="horizontal"> <SearchForm
Select Date initialValue={{
<DatePicker.RangePicker dates: [dayjs().startOf('year'), dayjs().endOf('year')],
format={config.DATE_FORMAT_MONTH} }}
allowClear={true} defaultValue={{
style={{ width: "100%" }} shows: ['dates'],
defaultValue={[search_date_start, search_date_end]} fieldProps: {
onChange={reportStore.onDateRangeChange} dates: { label: 'Select Date', col: 12 },
allowEmpty={true} },
picker="month" }}
confirmText={'Get Report'}
onSubmit={(err, formVal, filedsVal) => {
getHWVendorScores(travelAgencyId, formVal.startdate, formVal.enddate);
getHWProductScores(travelAgencyId, formVal.startdate, formVal.enddate);
getHWCommendScores(travelAgencyId, formVal.startdate, formVal.enddate);
}}
/> />
</Space>
</Col>
<Col md={24} lg={4} xxl={4}>
<Button
type="primary"
loading={reportStore.loading}
onClick={() => {
reportStore.getHWVendorScores(
authStore.login.travelAgencyId,
search_date_start == null ? null : search_date_start.format(config.DATE_FORMAT),
search_date_end == null ? null : search_date_end.format(config.DATE_FORMAT)
);
reportStore.getHWProductScores(
authStore.login.travelAgencyId,
search_date_start == null ? null : search_date_start.format(config.DATE_FORMAT),
search_date_end == null ? null : search_date_end.format(config.DATE_FORMAT)
);
reportStore.getHWCommendScores(
authStore.login.travelAgencyId,
search_date_start == null ? null : search_date_start.format(config.DATE_FORMAT),
search_date_end == null ? null : search_date_end.format(config.DATE_FORMAT)
);
}}>
Get Report
</Button>
</Col> </Col>
<Col md={24} lg={10} xxl={11}> <Col md={24} lg={6} xxl={12}>
<Button onClick={() => toPDF()}>Download PDF</Button> <Button onClick={() => toPDF()}>Download PDF</Button>
</Col> </Col>
</Row> </Row>
<Typography.Title level={3}></Typography.Title>
<Row ref={targetRef}> <Row ref={targetRef}>
<Col md={24} lg={24} xxl={16}> <Col md={24} lg={24} xxl={16}>
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">Primary Data</Typography.Title> <Typography.Title level={3} type='success'>
Primary Data
</Typography.Title>
</Divider> </Divider>
<div className="ant-table-wrapper ant-spin-nested-loading css-1x2egda css-dev-only-do-not-override-1x2egda "> <Table dataSource={primaryData} columns={columns_primary} pagination={false} bordered />
<div className="ant-spin-container ant-table ant-table-bordered">
<div className="ant-table-container">
<div className="ant-table-content">
<table style={{ textAlign: "center" }}>
<thead className="ant-table-thead">
<tr>
<th scope="col">Groups</th>
<th scope="col">Number of People</th>
<th scope="col">Transaction Amount (USD)</th>
<th scope="col">Evaluation Score</th>
<th scope="col">TP Reviews</th>
<th scope="col">TP Reviews Rate</th>
<th scope="col">Complaints</th>
<th scope="col">Complaint Rate</th>
</tr>
</thead>
<tbody className="ant-table-tbody">
<tr className="ant-table-row ant-table-row-level-0">
<td>{evaluationScores.Groups}</td>
<td>{evaluationScores.PersonNum}</td>
<td>{comm.formatPrice(evaluationScores.AmountUSD)}</td>
<td>{evaluationScores.EvaluationScore}</td>
<td>{evaluationScores.TPReviews}</td>
<td>{comm.formatPercent(evaluationScores.TPReviewRate)}</td>
<td>{evaluationScores.Complaints}</td>
<td>{comm.formatPercent(evaluationScores.ComplaintRate)}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</Col> </Col>
<Col md={24} lg={24} xxl={16}> <Col md={24} lg={24} xxl={16}>
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">Monthly Data</Typography.Title> <Typography.Title level={3} type='success'>
Monthly Data
</Typography.Title>
</Divider> </Divider>
<Table dataSource={vendorScoresData.MonthlyData} columns={columns_month} pagination={false} bordered /> <Table dataSource={vendorScoresData.MonthlyData} columns={columns_month} pagination={false} bordered />
</Col> </Col>
<Col md={24} lg={24} xxl={16}> <Col md={24} lg={24} xxl={16}>
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">DMC Assessment Criteria</Typography.Title> <Typography.Title level={3} type='success'>
DMC Assessment Criteria
</Typography.Title>
</Divider> </Divider>
<div className="ant-table-wrapper ant-spin-nested-loading css-1x2egda css-dev-only-do-not-override-1x2egda"> <Table dataSource={DMCData_customer_satisfaction} columns={columns_DMC_customer_satisfaction} pagination={false} bordered />
<div className="ant-spin-container ant-table ant-table-bordered">
<div className="ant-table-container">
<div className="ant-table-content">
<table style={{ textAlign: "center" }}>
<thead className="ant-table-thead">
<tr>
<th scope="col">Customer Satisfaction</th>
<th scope="col">3 scores</th>
<th scope="col">4 scores</th>
<th scope="col">5 scores</th>
<th scope="col">Your Scores</th>
<th scope="col">Final Scores</th>
<th scope="col">Note</th>
</tr>
</thead>
<tbody className="ant-table-tbody">
<tr className="ant-table-row ant-table-row-level-0">
<td>TP review rating</td>
<td>\</td>
<td>30%</td>
<td>60%</td>
<td>{evaluationScores.TPReviewRating}</td>
<td rowSpan="5">{evaluationScores.AvgCusSatisfaction}</td>
<td>{evaluationScores.TPReviewRatingText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Post tour complaints</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>{evaluationScores.PostTourComplaints}</td>
<td>{evaluationScores.PostTourComplaintsText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Complaints resolved during the tour</td>
<td colSpan={3}>3</td>
<td>{evaluationScores.ComplaintsDuringTour}</td>
<td>{evaluationScores.ComplaintsDuringTourText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Customer photos</td>
<td>\</td>
<td>30%</td>
<td>50%</td>
<td>{evaluationScores.CustomerPhotoRate}</td>
<td>{evaluationScores.CustomerPhotoRateText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Evaluation scores</td>
<td colSpan={3}>4.5</td>
<td>{evaluationScores.EvaluationFormScore}</td>
<td>{evaluationScores.EvaluationFormScoreText}</td>
</tr>
</tbody>
</table>
<br /> <br />
<table style={{ textAlign: "center" }}> <Table dataSource={DMCData_sopport_local} columns={columns_DMC_sopport_local} pagination={false} bordered />
<thead className="ant-table-thead">
<tr>
<th scope="col">Operator Support & Local resources</th>
<th scope="col">3 scores</th>
<th scope="col">4 scores</th>
<th scope="col">5 scores</th>
<th scope="col">Your Scores</th>
<th scope="col">Final Scores</th>
<th scope="col">Note</th>
</tr>
</thead>
<tbody className="ant-table-tbody">
<tr className="ant-table-row ant-table-row-level-0">
<td>Response efficiency</td>
<td>1d</td>
<td>6hrs</td>
<td>3hrs</td>
<td>{evaluationScores.ResponseEfficiency}</td>
<td rowSpan="6">{evaluationScores.AvgLocalResources}</td>
<td>{evaluationScores.ResponseEfficiencyText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Provide suggestions and alternatives</td>
<td>\</td>
<td></td>
<td></td>
<td>{evaluationScores.ProvideSuggestions}</td>
<td>{evaluationScores.ProvideSuggestionsText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Provide local tourism information</td>
<td>\</td>
<td></td>
<td></td>
<td>{evaluationScores.ProvideLocalInfo}</td>
<td>{evaluationScores.ProvideLocalInfoText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Assist in developing exclusive products</td>
<td>\</td>
<td>\</td>
<td></td>
<td>{evaluationScores.ExclusiveProducts}</td>
<td>{evaluationScores.ExclusiveProductsText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Dedicated tour guide team for AH</td>
<td>\</td>
<td></td>
<td></td>
<td>{evaluationScores.DedicatedTourGuide}</td>
<td>{evaluationScores.DedicatedTourGuideText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Partner hotels with contracted rate</td>
<td>\</td>
<td></td>
<td></td>
<td>{evaluationScores.PartnerHotels}</td>
<td>{evaluationScores.PartnerHotelsText}</td>
</tr>
</tbody>
</table>
<br /> <br />
<table style={{ textAlign: "center" }}> <Table dataSource={DMCData_pricing} columns={columns_DMC_pricing} pagination={false} bordered />
<thead className="ant-table-thead"> <Divider orientation='right'>
<tr> <Typography.Title level={3} type='danger'>
<th scope="col">Pricing & Settlement 20%</th>
<th scope="col">3 scores</th>
<th scope="col">4 scores</th>
<th scope="col">5 scores</th>
<th scope="col">Your Scores</th>
<th scope="col">Final Scores</th>
<th scope="col">Note</th>
</tr>
</thead>
<tbody className="ant-table-tbody">
<tr className="ant-table-row ant-table-row-level-0">
<td>Quotation</td>
<td>Package</td>
<td>Day tours</td>
<td>Individual services</td>
<td>{evaluationScores.Quotation}</td>
<td rowSpan="3">{evaluationScores.AvgPricingAndSettlement}</td>
<td>{evaluationScores.QuotationText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Settlement</td>
<td>Prepayment</td>
<td>Monthly Prepayment</td>
<td>Monthly settlement after the tours</td>
<td>{evaluationScores.Settlement}</td>
<td>{evaluationScores.SettlementText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Cancellation policy</td>
<td>30 days</td>
<td>21 days</td>
<td>1 day</td>
<td>{evaluationScores.CancellationPolicy}</td>
<td>{evaluationScores.CancellationPolicyText}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<Divider orientation="right">
<Typography.Title level={3} type="danger">
Final Scores: {evaluationScores.FinalScores} Final Scores: {evaluationScores.FinalScores}
</Typography.Title> </Typography.Title>
</Divider> </Divider>
<br /> <br />
<Typography> <Typography>
<Typography.Title level={3} type="success"> <Typography.Title level={3} type='success'>
Scoring Rules Scoring Rules
</Typography.Title> </Typography.Title>
<Typography.Paragraph type="success"> <Typography.Paragraph type='success'>
<ol> <ol>
<li>The maximum score is 5</li> <li>The maximum score is 5</li>
<li> <li>
@ -423,77 +358,39 @@ function Index() {
</Typography> </Typography>
<br /> <br />
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">Evaluation Scores</Typography.Title> <Typography.Title level={3} type='success'>
Evaluation Scores
</Typography.Title>
</Divider> </Divider>
<div className="ant-table-wrapper ant-spin-nested-loading css-1x2egda css-dev-only-do-not-override-1x2egda "> <Table dataSource={evaluationScoresData} columns={columns_evaluation} pagination={false} bordered />
<div className="ant-spin-container ant-table ant-table-bordered">
<div className="ant-table-container">
<div className="ant-table-content">
<table style={{ textAlign: "center" }}>
<thead className="ant-table-thead">
<tr>
<th scope="col">Category</th>
<th scope="col">Item</th>
<th scope="col">Your Scores</th>
<th scope="col">Note</th>
</tr>
</thead>
<tbody className="ant-table-tbody">
<tr className="ant-table-row ant-table-row-level-0">
<td rowSpan="4">DMC Services</td>
<td>Guide</td>
<td>{evaluationScores.FRTGuide}</td>
<td rowSpan="7">{evaluationScores.FRTText}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Driver & Vehicle</td>
<td>{evaluationScores.FRTGriver}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Food Arrangement</td>
<td>{evaluationScores.FRTMeal}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Activity</td>
<td>{evaluationScores.FRTProduct}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td rowSpan="2">Itinerary Arrangements</td>
<td>Hotel</td>
<td>{evaluationScores.FRTHotel}</td>
</tr>
<tr className="ant-table-row ant-table-row-level-0">
<td>Travel Advisor&rsquo;s Planning</td>
<td>{evaluationScores.FRTAdvisor}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</Col> </Col>
<Col md={24} lg={24} xxl={16}> <Col md={24} lg={24} xxl={16}>
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">Tour Guides Performence</Typography.Title> <Typography.Title level={3} type='success'>
Tour Guides Performence
</Typography.Title>
</Divider> </Divider>
<Table dataSource={productScoresData.GuideScores} columns={columns_guide} pagination={false} bordered /> <Table dataSource={productScoresData.GuideScores} columns={columns_guide} pagination={false} bordered />
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">TP Reviews</Typography.Title> <Typography.Title level={3} type='success'>
TP Reviews
</Typography.Title>
</Divider> </Divider>
<Table dataSource={commendScoresData.CommendScores} columns={columns_commend} pagination={false} bordered /> <Table dataSource={commendScoresData.CommendScores} columns={columns_commend} pagination={false} bordered />
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">Complaints</Typography.Title> <Typography.Title level={3} type='success'>
Complaints
</Typography.Title>
</Divider> </Divider>
<Table dataSource={commendScoresData.ComplaintScores} columns={columns_commend} pagination={false} bordered /> <Table dataSource={commendScoresData.ComplaintScores} columns={columns_commend} pagination={false} bordered />
<Divider orientation="center"> <Divider orientation='center'>
<Typography.Title level={3} type="success">Suggestions from Customers</Typography.Title> <Typography.Title level={3} type='success'>
Suggestions from Customers
</Typography.Title>
</Divider> </Divider>
<Table dataSource={commendScoresData.CriticizeScores} columns={columns_commend} pagination={false} bordered /> <Table dataSource={commendScoresData.CriticizeScores} columns={columns_commend} pagination={false} bordered />
</Col> </Col>
@ -502,4 +399,4 @@ function Index() {
); );
} }
export default observer(Index); export default (Index);

Loading…
Cancel
Save