Minor UI improvements

This commit is contained in:
IRBorisov 2024-02-03 15:58:55 +03:00
parent a5f3539798
commit 6ae6451236
2 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,7 @@ export const AuthState = ({ children }: AuthStateProps) => {
setError(undefined); setError(undefined);
postLogin({ postLogin({
data: data, data: data,
showError: true, showError: false,
setLoading: setLoading, setLoading: setLoading,
onError: setError, onError: setError,
onSuccess: newData => onSuccess: newData =>

View File

@ -192,6 +192,7 @@ function RSTabs() {
data.alias = data.alias || generateAlias(data.cst_type, schema); data.alias = data.alias || generateAlias(data.cst_type, schema);
cstCreate(data, newCst => { cstCreate(data, newCst => {
toast.success(`Конституента добавлена: ${newCst.alias}`); toast.success(`Конституента добавлена: ${newCst.alias}`);
setSelected([newCst.id]);
navigateTab(activeTab, newCst.id); navigateTab(activeTab, newCst.id);
if (activeTab === RSTabID.CST_EDIT || activeTab === RSTabID.CST_LIST) { if (activeTab === RSTabID.CST_EDIT || activeTab === RSTabID.CST_LIST) {
setTimeout(() => { setTimeout(() => {