import { useEffect } from "react"; import { observer } from "mobx-react"; import { Row, Col, Space, Button, Table, Divider, Typography, DatePicker } from "antd"; import { useStore } from "@/stores/StoreContext.js"; import * as config from "@/config"; import * as comm from "@/utils/commons"; import { usePDF } from "react-to-pdf"; function Index() { const { reportStore, authStore } = useStore(); const { search_date_start, search_date_end, vendorScoresData, productScoresData, commendScoresData } = reportStore; const evaluationScores = vendorScoresData.EvaluationScores ? vendorScoresData.EvaluationScores[0] : []; useEffect(() => {}, []); const columns_month = [ { title: "Date", dataIndex: "VMonth", key: "VMonth", }, { title: "Groups", dataIndex: "Groups", key: "Groups", }, { title: "Number of People", dataIndex: "PersonNum", key: "PersonNum", }, { title: "Transaction Amount(USD)", dataIndex: "AmountUSD", key: "AmountUSD", render: value => comm.formatPrice(value), }, { title: "Evaluation Score", dataIndex: "EvaluationScore", key: "EvaluationScore", }, { title: "TP Reviews", dataIndex: "TPReviews", key: "TPReviews", }, { title: "TP Reviews Rate", dataIndex: "TPReviewRate", key: "TPReviewRate", render: value => comm.formatPercent(value), }, { title: "Complaints", dataIndex: "Complaints", key: "Complaints", }, { title: "Complaint Rate", dataIndex: "ComplaintRate", key: "ComplaintRate", render: value => comm.formatPercent(value), }, ]; const columns_guide = [ { title: "Name", dataIndex: "TGI2_Name", key: "TGI2_Name", }, { title: "Average Scores", dataIndex: "VAverage", key: "VAverage", }, { title: "Group Numbers", dataIndex: "ReceptionGroups", key: "ReceptionGroups", }, { title: "TP Reviews", dataIndex: "CommendNum", key: "CommendNum", }, { title: "TP Review Rate", dataIndex: "CommendRate", key: "CommendRate", render: value => comm.formatPercent(value), }, { title: "Complaints", dataIndex: "Complaints", key: "Complaints", }, { title: "Complaint Rate", dataIndex: "ComplaintRate", key: "ComplaintRate", render: value => comm.formatPercent(value), }, ]; const columns_commend = [ { title: "Reference Number", dataIndex: "GRI_No", key: "GRI_No", }, { title: "Tour Guides", dataIndex: "ObjectName", key: "ObjectName", }, { title: "Essential Comments", dataIndex: "ECI_Content", key: "ECI_Content", }, ]; const { toPDF, targetRef } = usePDF({ method: "save", filename: "GHH-Report.pdf", page: { margin: "3", format: "letter" }, //margin: Margin.SMALL, canvas: { mimeType: "image/jpeg", qualityRatio: 1 }, overrides: { pdf: { compress: true }, canvas: { useCORS: true } }, }); return ( Select Date Primary Data
Groups Number of People Transaction Amount(USD) Evaluation Score TP Reviews TP Reviews Rate Complaints Complaint Rate
{evaluationScores.Groups} {evaluationScores.PersonNum} {comm.formatPrice(evaluationScores.AmountUSD)} {evaluationScores.EvaluationScore} {evaluationScores.TPReviews} {comm.formatPercent(evaluationScores.TPReviewRate)} {evaluationScores.Complaints} {comm.formatPercent(evaluationScores.ComplaintRate)}
Monthly Data DMC Assessment Criteria
Customer Satisfaction 3 scores 4 scores 5 scores Your Scores Final Scores Note
TP review rating \ 30% 60% {evaluationScores.TPReviewRating} {evaluationScores.AvgCusSatisfaction} {evaluationScores.TPReviewRatingText}
Post tour complaints 1 0 0 {evaluationScores.PostTourComplaints} {evaluationScores.PostTourComplaintsText}
Complaints resolved during the tour 3 {evaluationScores.ComplaintsDuringTour} {evaluationScores.ComplaintsDuringTourText}
Customer photos \ 30% 50% {evaluationScores.CustomerPhotoRate} {evaluationScores.CustomerPhotoRateText}
Evaluation scores 4.5 {evaluationScores.EvaluationFormScore} {evaluationScores.EvaluationFormScoreText}

Operator Support & Local resources 3 scores 4 scores 5 scores Your Scores Final Scores Note
Response efficiency 1d 6hrs 3hrs {evaluationScores.ResponseEfficiency} {evaluationScores.AvgLocalResources} {evaluationScores.ResponseEfficiencyText}
Provide suggestions and alternatives \ {evaluationScores.ProvideSuggestions} {evaluationScores.ProvideSuggestionsText}
Provide local tourism information \ {evaluationScores.ProvideLocalInfo} {evaluationScores.ProvideLocalInfoText}
Assist in developing exclusive products \ \ {evaluationScores.ExclusiveProducts} {evaluationScores.ExclusiveProductsText}
Dedicated tour guide team for AH \ {evaluationScores.DedicatedTourGuide} {evaluationScores.DedicatedTourGuideText}
Partner hotels with contracted rate \ {evaluationScores.PartnerHotels} {evaluationScores.PartnerHotelsText}

Pricing & Settlement (20%) 3 scores 4 scores 5 scores Your Scores Final Scores Note
Quotation Package Day tours Individual services {evaluationScores.Quotation} {evaluationScores.AvgPricingAndSettlement} {evaluationScores.QuotationText}
Settlement Prepayment Monthly Prepayment Monthly settlement after the tours {evaluationScores.Settlement} {evaluationScores.SettlementText}
Cancellation policy 30 days 21 days 1 day {evaluationScores.CancellationPolicy} {evaluationScores.CancellationPolicyText}
Final Scores: {evaluationScores.FinalScores}
Scoring Rules
  1. The maximum score is 5
  2. The three categories are:
    • Customer satisfaction (40%)
    • Operator support & local resources (40%)
    • Pricing & settlement (20%)
  3. For each category, you can only get the corresponding score if you meet the standards of all items under the score.
  4. The final score is the sum of the scores of each category multiplied by the proportion of the category.

Evaluation Scores
Category Item Your Scores Note
DMC Services Guide {evaluationScores.FRTGuide} {evaluationScores.FRTText}
Driver & Vehicle {evaluationScores.FRTGriver}
Food Arrangement {evaluationScores.FRTMeal}
Itinerary Arrangements Hotel {evaluationScores.FRTHotel}
Travel Advisor's Planning {evaluationScores.FRTAdvisor}
Tour Guides Performence TP Reviews
Complaints
Suggestions from Customers
); } export default observer(Index);