|
@@ -201,63 +201,61 @@ export default function SearchPage({ branch: routeBranch }) {
|
|
|
- We intentionally cap the content to ~60% (centered) to improve readability.
|
|
- We intentionally cap the content to ~60% (centered) to improve readability.
|
|
|
- On smaller screens we keep full width for usability.
|
|
- On smaller screens we keep full width for usability.
|
|
|
*/
|
|
*/
|
|
|
- <div className="w-full lg:w-[60%] lg:mx-auto">
|
|
|
|
|
- <ExplorerPageShell
|
|
|
|
|
|
|
+ <ExplorerPageShell
|
|
|
|
|
+ title="Suche"
|
|
|
|
|
+ description={`Lieferscheine durchsuchen • Niederlassung ${routeBranch}`}
|
|
|
|
|
+ actions={actions}
|
|
|
|
|
+ >
|
|
|
|
|
+ <ExplorerSectionCard
|
|
|
title="Suche"
|
|
title="Suche"
|
|
|
- description={`Lieferscheine durchsuchen • Niederlassung ${routeBranch}`}
|
|
|
|
|
- actions={actions}
|
|
|
|
|
|
|
+ description="Suchbegriff und Suchbereich auswählen."
|
|
|
|
|
+ >
|
|
|
|
|
+ <SearchForm
|
|
|
|
|
+ branch={routeBranch}
|
|
|
|
|
+ qDraft={qDraft}
|
|
|
|
|
+ onQDraftChange={setQDraft}
|
|
|
|
|
+ onSubmit={handleSubmit}
|
|
|
|
|
+ currentQuery={urlState.q}
|
|
|
|
|
+ isSubmitting={query.status === "loading"}
|
|
|
|
|
+ isAdminDev={isAdminDev}
|
|
|
|
|
+ scope={urlState.scope}
|
|
|
|
|
+ onScopeChange={handleScopeChange}
|
|
|
|
|
+ onSingleBranchChange={handleSingleBranchChange}
|
|
|
|
|
+ availableBranches={
|
|
|
|
|
+ branchesQuery.status === BRANCH_LIST_STATE.READY &&
|
|
|
|
|
+ Array.isArray(branchesQuery.branches)
|
|
|
|
|
+ ? branchesQuery.branches
|
|
|
|
|
+ : []
|
|
|
|
|
+ }
|
|
|
|
|
+ branchesStatus={branchesQuery.status}
|
|
|
|
|
+ selectedBranches={urlState.branches}
|
|
|
|
|
+ onToggleBranch={handleToggleBranch}
|
|
|
|
|
+ onClearAllBranches={handleClearAllBranches}
|
|
|
|
|
+ limit={urlState.limit}
|
|
|
|
|
+ onLimitChange={handleLimitChange}
|
|
|
|
|
+ />
|
|
|
|
|
+ </ExplorerSectionCard>
|
|
|
|
|
+
|
|
|
|
|
+ <ExplorerSectionCard
|
|
|
|
|
+ title="Ergebnisse"
|
|
|
|
|
+ description={resultsDescription}
|
|
|
|
|
+ headerRight={resultsHeaderRight}
|
|
|
>
|
|
>
|
|
|
- <ExplorerSectionCard
|
|
|
|
|
- title="Suche"
|
|
|
|
|
- description="Suchbegriff und Suchbereich auswählen."
|
|
|
|
|
- >
|
|
|
|
|
- <SearchForm
|
|
|
|
|
- branch={routeBranch}
|
|
|
|
|
- qDraft={qDraft}
|
|
|
|
|
- onQDraftChange={setQDraft}
|
|
|
|
|
- onSubmit={handleSubmit}
|
|
|
|
|
- currentQuery={urlState.q}
|
|
|
|
|
- isSubmitting={query.status === "loading"}
|
|
|
|
|
- isAdminDev={isAdminDev}
|
|
|
|
|
- scope={urlState.scope}
|
|
|
|
|
- onScopeChange={handleScopeChange}
|
|
|
|
|
- onSingleBranchChange={handleSingleBranchChange}
|
|
|
|
|
- availableBranches={
|
|
|
|
|
- branchesQuery.status === BRANCH_LIST_STATE.READY &&
|
|
|
|
|
- Array.isArray(branchesQuery.branches)
|
|
|
|
|
- ? branchesQuery.branches
|
|
|
|
|
- : []
|
|
|
|
|
- }
|
|
|
|
|
- branchesStatus={branchesQuery.status}
|
|
|
|
|
- selectedBranches={urlState.branches}
|
|
|
|
|
- onToggleBranch={handleToggleBranch}
|
|
|
|
|
- onClearAllBranches={handleClearAllBranches}
|
|
|
|
|
- limit={urlState.limit}
|
|
|
|
|
- onLimitChange={handleLimitChange}
|
|
|
|
|
- />
|
|
|
|
|
- </ExplorerSectionCard>
|
|
|
|
|
-
|
|
|
|
|
- <ExplorerSectionCard
|
|
|
|
|
- title="Ergebnisse"
|
|
|
|
|
- description={resultsDescription}
|
|
|
|
|
- headerRight={resultsHeaderRight}
|
|
|
|
|
- >
|
|
|
|
|
- <SearchResults
|
|
|
|
|
- branch={routeBranch}
|
|
|
|
|
- scope={urlState.scope}
|
|
|
|
|
- status={query.status}
|
|
|
|
|
- items={query.items}
|
|
|
|
|
- total={query.total}
|
|
|
|
|
- error={mappedError}
|
|
|
|
|
- onRetry={query.retry}
|
|
|
|
|
- nextCursor={query.nextCursor}
|
|
|
|
|
- onLoadMore={query.loadMore}
|
|
|
|
|
- isLoadingMore={query.isLoadingMore}
|
|
|
|
|
- loadMoreError={mappedLoadMoreError}
|
|
|
|
|
- needsBranchSelection={needsBranchSelection}
|
|
|
|
|
- />
|
|
|
|
|
- </ExplorerSectionCard>
|
|
|
|
|
- </ExplorerPageShell>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <SearchResults
|
|
|
|
|
+ branch={routeBranch}
|
|
|
|
|
+ scope={urlState.scope}
|
|
|
|
|
+ status={query.status}
|
|
|
|
|
+ items={query.items}
|
|
|
|
|
+ total={query.total}
|
|
|
|
|
+ error={mappedError}
|
|
|
|
|
+ onRetry={query.retry}
|
|
|
|
|
+ nextCursor={query.nextCursor}
|
|
|
|
|
+ onLoadMore={query.loadMore}
|
|
|
|
|
+ isLoadingMore={query.isLoadingMore}
|
|
|
|
|
+ loadMoreError={mappedLoadMoreError}
|
|
|
|
|
+ needsBranchSelection={needsBranchSelection}
|
|
|
|
|
+ />
|
|
|
|
|
+ </ExplorerSectionCard>
|
|
|
|
|
+ </ExplorerPageShell>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|