Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove return loan button from query builder #6340

Open
wants to merge 1 commit into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions specifyweb/frontend/js_src/lib/components/QueryBuilder/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,13 @@ import type { SpecifyResource } from '../DataModel/legacyTypes';
import { resourceEvents } from '../DataModel/resource';
import { tables } from '../DataModel/tables';
import type { RecordSet, SpQuery, SpQueryField } from '../DataModel/types';
import { ErrorBoundary } from '../Errors/ErrorBoundary';
import { TableIcon } from '../Molecules/TableIcon';
import {
hasPermission,
hasTablePermission,
hasToolPermission,
} from '../Permissions/helpers';
import { SaveQueryButtons, ToggleMappingViewButton } from './Components';
import { useQueryViewPref } from './Context';
import { QueryEditButton } from './Edit';
import { QueryLoanReturn } from './LoanReturn';
import type { MainState } from './reducer';

export type QueryView = {
Expand Down Expand Up @@ -109,19 +105,6 @@ export function QueryHeader({
/>
)}
</div>
{state.baseTableName === 'LoanPreparation' &&
hasPermission('/querybuilder/query', 'execute') &&
hasTablePermission('Loan', 'update') &&
hasTablePermission('LoanReturnPreparation', 'create') &&
hasTablePermission('LoanPreparation', 'read') ? (
<ErrorBoundary dismissible>
<QueryLoanReturn
fields={state.fields}
getQueryFieldRecords={getQueryFieldRecords}
queryResource={queryResource}
/>
</ErrorBoundary>
) : undefined}
<div className="flex flex-wrap justify-center gap-2">
<Button.Small onClick={() => setIsBasic(!isBasic)}>
{isBasic
Expand Down
231 changes: 0 additions & 231 deletions specifyweb/frontend/js_src/lib/components/QueryBuilder/LoanReturn.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions specifyweb/frontend/js_src/lib/localization/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,23 +606,6 @@ export const queryText = createDictionary({
'uk-ua': 'Так',
'de-ch': 'Ja',
},
noPreparationsToReturn: {
'en-us': 'There are no unresolved items to return',
'ru-ru': 'Нет нерешенных вопросов для возврата',
'es-es': 'No hay items sin resolver para devolver',
'fr-fr': "Il n'y a aucun article non résolu à retourner",
'uk-ua': 'Немає невирішених елементів для повернення',
'de-ch':
'Es gibt keine ungelösten Elemente, die zurückgegeben werden müssen',
},
itemsReturned: {
'en-us': 'Items have been returned',
'ru-ru': 'Товары были возвращены',
'es-es': 'Los items han sido devueltos',
'fr-fr': 'Les articles ont été retournés',
'uk-ua': 'Товари повернуто',
'de-ch': 'Artikel wurden zurückgegeben',
},
queryResults: {
'en-us': 'Query Results',
'ru-ru': 'Результаты запроса',
Expand Down
Loading