admin(ui): implement MountEditContainer.tsx, minor tweaks
This commit is contained in:
parent
11b7197c49
commit
e70351cbad
10 changed files with 166 additions and 13 deletions
|
@ -6,7 +6,7 @@ export interface Mount {
|
|||
id: number;
|
||||
uuid: string;
|
||||
name: string;
|
||||
description: string;
|
||||
description?: string;
|
||||
source: string;
|
||||
target: string;
|
||||
readOnly: boolean;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import http from '@/api/http';
|
||||
import { Mount, rawDataToMount } from '@/api/admin/mounts/getMounts';
|
||||
|
||||
export default (id: number, name: string, description: string, source: string, target: string, readOnly: boolean, userMountable: boolean): Promise<Mount> => {
|
||||
export default (id: number, name: string, description: string | null, source: string, target: string, readOnly: boolean, userMountable: boolean): Promise<Mount> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.patch(`/api/application/mounts/${id}`, {
|
||||
name, description, source, target, read_only: readOnly, user_mountable: userMountable,
|
||||
|
|
|
@ -8,7 +8,7 @@ export interface Nest {
|
|||
uuid: string;
|
||||
author: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
description?: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import http, { FractalResponseData } from '@/api/http';
|
|||
export interface Role {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string | null;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export const rawDataToRole = ({ attributes }: FractalResponseData): Role => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue