Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadsw committed Dec 23, 2024
1 parent 0b3dc37 commit 3b5e6a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 40 deletions.
6 changes: 3 additions & 3 deletions specifyweb/frontend/js_src/lib/components/BatchEdit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import { H2, H3 } from '../Atoms';
import { Button } from '../Atoms/Button';
import { dialogIcons } from '../Atoms/Icons';
import { LoadingContext } from '../Core/Contexts';
import type { AnyTree, SerializedResource } from '../DataModel/helperTypes';
import type { AnyTree, FilterTablesByEndsWith, SerializedResource } from '../DataModel/helperTypes';
import type { SpecifyResource } from '../DataModel/legacyTypes';
import { schema } from '../DataModel/schema';
import { serializeResource } from '../DataModel/serializers';
import type { LiteralField, Relationship } from '../DataModel/specifyField';
import type { SpecifyTable } from '../DataModel/specifyTable';
import { strictGetTable } from '../DataModel/tables';
import type { GeographyTreeDefItem, SpQuery, Tables } from '../DataModel/types';
import type { SpQuery, Tables } from '../DataModel/types';
import {
isTreeTable,
strictGetTreeDefinitionItems,
Expand Down Expand Up @@ -166,7 +166,7 @@ const filters = [containsFaultyNestedToMany, containsSystemTables];

const getTreeDefFromName = (
rankName: string,
treeDefItems: RA<SerializedResource<GeographyTreeDefItem>>
treeDefItems: RA<SerializedResource<FilterTablesByEndsWith<'TreeDefItem'>>>
) =>
defined(
treeDefItems.find(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Button } from '../Atoms/Button';
import { LoadingContext } from '../Core/Contexts';
import type { Tables } from '../DataModel/types';
import { Dialog, dialogClassNames } from '../Molecules/Dialog';
import { DataSetsDialog } from '../Toolbar/WbsDialog';
import { GenericDataSetsDialog } from '../Toolbar/WbsDialog';
import { ListOfBaseTables } from './Components';
import type { UploadPlan } from './uploadPlanParser';
import type { Dataset } from './Wrapped';
Expand Down Expand Up @@ -38,8 +38,8 @@ function TemplateSelection({
{wbPlanText.invalidTemplatePlan()}
</Dialog>
)}
<DataSetsDialog
showTemplates
<GenericDataSetsDialog
wbVariant="workbenchChoosePlan"
onClose={handleClose}
onDataSetSelect={(id: number): void =>
loading(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from 'react';
import ReactDOMServer from 'react-dom/server';

import { wbPlanText } from '../../localization/wbPlan';
import { f } from '../../utils/functools';
import { icons } from '../Atoms/Icons';
import { getTable } from '../DataModel/tables';
import { TableIcon } from '../Molecules/TableIcon';
import { userPreferences } from '../Preferences/userPreferences';
import type { Dataset } from '../WbPlanView/Wrapped';
Expand Down
34 changes: 2 additions & 32 deletions specifyweb/frontend/js_src/lib/localization/workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,32 +703,7 @@ export const wbText = createDictionary({
uploadErrorsSecondDescription: {
'en-us': `
Validate the Data Set and review the mouseover hints for each error cell,
then make the appropriate corrections. Save and retry the Upload.
`,
'ru-ru': `
Проверте набор данных и наведите указатель мыши на каждую ячейку с
ошибкой, затем сделайте соответствующие исправления, сохраните и повторите
попытку.
`,
'es-es': `
Valide el conjunto de datos y revise las sugerencias del mouseover para
cada celda de error, luego haga las correcciones apropiadas. Guarde y
vuelva a intentar la carga.
`,
'fr-fr': `
Validez l'ensemble de données et examinez les conseils de passage de la
souris pour chaque cellule d'erreur, puis apportez les corrections
appropriées. Enregistrez et réessayez le téléchargement.
`,
'uk-ua': `
Перевірте набір даних і перегляньте підказки для кожної клітинки помилки,
а потім внесіть відповідні виправлення. Збережіть і повторіть спробу
завантаження.
`,
'de-ch': `
Validieren Sie den Datensatz und überprüfen Sie die Mouseover-Hinweise für
jede Fehlerzelle. Nehmen Sie dann die entsprechenden Korrekturen vor.
Speichern Sie und versuchen Sie den Upload erneut.
then make the appropriate corrections. Save and retry the {type:string}.
`,
},
dataSetRollback: {
Expand Down Expand Up @@ -1263,12 +1238,7 @@ export const wbText = createDictionary({
'de-ch': 'Neuer Datensatz {date}',
},
dataSets: {
'en-us': 'WorkBench Data Sets',
'ru-ru': 'Наборы данных',
'es-es': 'Conjuntos de datos de WorkBench',
'fr-fr': 'Ensembles de données WorkBench',
'uk-ua': 'Набори даних WorkBench',
'de-ch': 'WorkBench-Datensätze',
'en-us': '{variant:string} WorkBench Data Sets',
},
wbsDialogEmpty: {
'en-us': 'Currently no Data Sets exist.',
Expand Down

0 comments on commit 3b5e6a1

Please sign in to comment.