admin(ui): implement MountEditContainer.tsx, minor tweaks

This commit is contained in:
Matthew Penner 2021-01-08 15:34:55 -07:00
parent 11b7197c49
commit e70351cbad
10 changed files with 166 additions and 13 deletions

View file

@ -6,7 +6,7 @@ export interface Mount {
id: number;
uuid: string;
name: string;
description: string;
description?: string;
source: string;
target: string;
readOnly: boolean;

View file

@ -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,

View file

@ -8,7 +8,7 @@ export interface Nest {
uuid: string;
author: string;
name: string;
description: string | null;
description?: string;
createdAt: Date;
updatedAt: Date;

View file

@ -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 => ({