File tree Expand file tree Collapse file tree
components/events/partials/ModalTabsAndPages
i18n/org/opencastproject/adminui/languages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ import RenderDate from "../../../shared/RenderDate";
1818import WizardNavigationButtons from "../../../shared/wizard/WizardNavigationButtons" ;
1919import { ParseKeys } from "i18next" ;
2020import ModalContentTable from "../../../shared/modals/ModalContentTable" ;
21+ import { addNotification } from "../../../../slices/notificationSlice" ;
22+ import { NOTIFICATION_CONTEXT } from "../../../../configs/modalConfig" ;
2123
2224type InitialValues = {
2325 [ key : string ] : string | string [ ] ;
@@ -51,7 +53,24 @@ const DetailsMetadataTab = ({
5153 const user = useAppSelector ( state => getUserInformation ( state ) ) ;
5254
5355 const handleSubmit = ( values : { [ key : string ] : any } , catalog : MetadataCatalog ) => {
54- dispatch ( updateResource ( { id : resourceId , values, catalog } ) ) ;
56+ dispatch ( updateResource ( { id : resourceId , values, catalog } ) )
57+ . unwrap ( )
58+ . then ( ( ) => {
59+ dispatch ( addNotification ( {
60+ type : "info" ,
61+ key : "METADATA_SAVED" ,
62+ duration : 3 ,
63+ context : NOTIFICATION_CONTEXT ,
64+ } ) ) ;
65+ } )
66+ . catch ( ( ) => {
67+ dispatch ( addNotification ( {
68+ type : "warning" ,
69+ key : "METADATA_NOT_SAVED" ,
70+ duration : 3 ,
71+ context : NOTIFICATION_CONTEXT ,
72+ } ) ) ;
73+ } ) ;
5574 } ;
5675
5776 // set current values of metadata fields as initial values
Original file line number Diff line number Diff line change 210210 "SERIES_THEME_REPROCESS_EXISTING_EVENTS" : " The existing events in this series will need to be reprocessed" ,
211211 "SERIES_ACL_LOCKED" : " Editing Access Policies is not allowed when operations are running on an event that is part of the series" ,
212212 "EVENT_ACL_MISSING_READWRITE_ROLE" : " The Access Policy requires at least one role with Read and Write permissions." ,
213+ "METADATA_SAVED" : " The metadata has been saved." ,
214+ "METADATA_NOT_SAVED" : " The metadata has NOT been saved!" ,
213215 "THEME_NAME_EMPTY" : " The name cannot be empty" ,
214216 "BUMPER_UPLOAD_ERROR" : " Error while uploading media" ,
215217 "THEME_CREATED" : " The theme has been created" ,
Original file line number Diff line number Diff line change @@ -2465,13 +2465,7 @@ const eventDetailsSlice = createSlice({
24652465 state . errorStatisticsValue = action . error ;
24662466 console . error ( action . error ) ;
24672467 } )
2468- . addCase ( updateMetadata . rejected , ( _state , action ) => {
2469- console . error ( action . error ) ;
2470- } )
2471- . addCase ( updateExtendedMetadata . rejected , ( _state , action ) => {
2472- console . error ( action . error ) ;
2473- } )
2474- . addCase ( fetchHasActiveTransactions . rejected , ( _state , action ) => {
2468+ . addCase ( fetchHasActiveTransactions . rejected , ( state , action ) => {
24752469 console . error ( action . error ) ;
24762470 } )
24772471 . addCase ( deleteComment . rejected , ( _state , action ) => {
You can’t perform that action at this time.
0 commit comments