1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-11 03:34:35 +00:00

chore: code fixes API + web

This commit is contained in:
Saad Jutt
2022-07-05 02:34:33 +05:00
parent 5338ffb211
commit 0b759a5594
7 changed files with 57 additions and 41 deletions

View File

@@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"start": "npx webpack-dev-server --config webpack.dev.ts --hot",
"build": "npx webpack --config webpack.prod.ts"
"start": "webpack-dev-server --config webpack.dev.ts --hot",
"build": "webpack --config webpack.prod.ts"
},
"dependencies": {
"@emotion/react": "^11.4.1",

View File

@@ -22,7 +22,7 @@ const Login = () => {
username,
password
}).catch((err: any) => {
setErrorMessage(err.response.data)
setErrorMessage(err.response?.data || err.toString())
return {}
})

View File

@@ -1,4 +1,4 @@
import React, { useState, Dispatch, SetStateAction } from 'react'
import React, { useState, Dispatch, SetStateAction, useEffect } from 'react'
import {
Button,
Grid,
@@ -38,6 +38,10 @@ const UpdatePermissionModal = ({
}: UpdatePermissionModalProps) => {
const [permissionSetting, setPermissionSetting] = useState('Grant')
useEffect(() => {
if (permission) setPermissionSetting(permission.setting)
}, [permission])
return (
<BootstrapDialog onClose={() => handleOpen(false)} open={open}>
<BootstrapDialogTitle