Bridge integration
This commit is contained in:
parent
42a5e09c94
commit
162390008b
56 changed files with 776 additions and 591 deletions
|
|
@ -9,6 +9,7 @@ import { type Database } from "bridge-common";
|
|||
import { generateDeleteAction } from "../lib/actions";
|
||||
import { serviceConfig } from "../config/config";
|
||||
import { FieldDescription } from "../lib/service";
|
||||
import { getBasePath } from "../lib/frontendUtils";
|
||||
|
||||
type DetailProps = {
|
||||
service: string;
|
||||
|
|
@ -29,7 +30,7 @@ export const Detail: FC<DetailProps> = ({ service, row }) => {
|
|||
const continueDeleteAction = async () => {
|
||||
await deleteAction?.(id);
|
||||
setShowDeleteConfirmation(false);
|
||||
router.push(`/${entity}`);
|
||||
router.push(`${getBasePath()}${entity}`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
@ -37,7 +38,7 @@ export const Detail: FC<DetailProps> = ({ service, row }) => {
|
|||
<Dialog
|
||||
open
|
||||
title={`${displayName} Detail`}
|
||||
onClose={() => router.push(`/${entity}`)}
|
||||
onClose={() => router.push(`${getBasePath()}${entity}`)}
|
||||
buttons={
|
||||
<Grid container justifyContent="space-between">
|
||||
<Grid item container xs="auto" spacing={2}>
|
||||
|
|
@ -52,12 +53,16 @@ export const Detail: FC<DetailProps> = ({ service, row }) => {
|
|||
<Button
|
||||
text="Edit"
|
||||
kind="secondary"
|
||||
href={`/${entity}/${id}/edit`}
|
||||
href={`${getBasePath()}${entity}/${id}/edit`}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<Button text="Done" kind="primary" href={`/${entity}`} />
|
||||
<Button
|
||||
text="Done"
|
||||
kind="primary"
|
||||
href={`${getBasePath()}${entity}`}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue