i18n: + vendor.json

feature/price_manager
Lei OT 1 year ago
parent 877a020dc0
commit 6b2d3d2b04

@ -0,0 +1,5 @@
{
"report": {
"GetReport": "Get Report"
}
}

@ -0,0 +1,5 @@
{
"report": {
"GetReport": "获取报告"
}
}

@ -17,7 +17,7 @@ i18n
backend: { backend: {
loadPath: '/locales/{{lng}}/{{ns}}.json', loadPath: '/locales/{{lng}}/{{ns}}.json',
}, },
ns: ['common', 'group'], ns: ['common', 'group', 'vendor'],
defaultNS: 'common', defaultNS: 'common',
detection: { detection: {
// convertDetectedLanguage: 'Iso15897', // convertDetectedLanguage: 'Iso15897',

@ -5,8 +5,10 @@ import dayjs from 'dayjs';
import SearchForm from '@/components/SearchForm'; import SearchForm from '@/components/SearchForm';
import useAuthStore from '@/stores/Auth'; import useAuthStore from '@/stores/Auth';
import useReportStore from '@/stores/Report'; import useReportStore from '@/stores/Report';
import { useTranslation } from 'react-i18next'
function Index() { function Index() {
const { t } = useTranslation();
const [travelAgencyId, ] = useAuthStore((state) => [state.loginUser.travelAgencyId]); const [travelAgencyId, ] = useAuthStore((state) => [state.loginUser.travelAgencyId]);
const [loading, vendorScoresData, getHWVendorScores] = useReportStore((state) => [state.loading, state.vendorScoresData, state.getHWVendorScores]); const [loading, vendorScoresData, getHWVendorScores] = useReportStore((state) => [state.loading, state.vendorScoresData, state.getHWVendorScores]);
@ -288,7 +290,7 @@ function Index() {
}, },
fieldComProps: { dates: { picker: 'month', presets: false } }, fieldComProps: { dates: { picker: 'month', presets: false } },
}} }}
confirmText={'Get Report'} confirmText={t('vendor:report.GetReport')}
onSubmit={(err, formVal, filedsVal) => { onSubmit={(err, formVal, filedsVal) => {
getHWVendorScores(travelAgencyId, formVal.startdate, formVal.enddate); getHWVendorScores(travelAgencyId, formVal.startdate, formVal.enddate);
getHWProductScores(travelAgencyId, formVal.startdate, formVal.enddate); getHWProductScores(travelAgencyId, formVal.startdate, formVal.enddate);

Loading…
Cancel
Save