diff --git a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRowContent.js b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRowContent.js index 2fcb6aca7f..aba9472058 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRowContent.js +++ b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRowContent.js @@ -182,12 +182,15 @@ class FilesRowContent extends React.PureComponent { !item.fileExst ? createFolder(item.parentId, itemTitle) .then(() => this.completeAction(itemId)) - .finally(() => { + .then(() => toastr.success( New folder {{ itemTitle }} is created - ); + ) + ) + .catch((e) => toastr.error(e)) + .finally(() => { return setIsLoading(false); }) : createFile(item.parentId, `${itemTitle}.${item.fileExst}`) @@ -195,13 +198,16 @@ class FilesRowContent extends React.PureComponent { openDocEditor(file.id, tab, file.webUrl); this.completeAction(itemId); }) - .finally(() => { + .then(() => { const exst = item.fileExst; - toastr.success( + return toastr.success( New file {{ itemTitle }}.{{ exst }} is created ); + }) + .catch((e) => toastr.error(e)) + .finally(() => { return setIsLoading(false); }); }; diff --git a/products/ASC.Files/Client/src/store/files/selectors.js b/products/ASC.Files/Client/src/store/files/selectors.js index 272be63b9a..921a2038cd 100644 --- a/products/ASC.Files/Client/src/store/files/selectors.js +++ b/products/ASC.Files/Client/src/store/files/selectors.js @@ -132,7 +132,7 @@ export const isSound = (extension) => { }; export const isVideo = (extension) => { - return createSelector(getVideoFormats, (formats) => { + return createSelector(getMediaViewerMediaFormats, (formats) => { return presentInArray(formats, extension); }); }; diff --git a/products/ASC.People/Server/Controllers/PeopleController.cs b/products/ASC.People/Server/Controllers/PeopleController.cs index e75bae1aa3..98e71bbd2e 100644 --- a/products/ASC.People/Server/Controllers/PeopleController.cs +++ b/products/ASC.People/Server/Controllers/PeopleController.cs @@ -456,7 +456,7 @@ namespace ASC.Employee.Core.Controllers UpdateContacts(memberModel.Contacts, user); - user = UserManagerWrapper.AddUser(user, memberModel.PasswordHash, false, true, memberModel.IsVisitor); + user = UserManagerWrapper.AddUser(user, memberModel.PasswordHash, memberModel.FromInviteLink, true, memberModel.IsVisitor, memberModel.FromInviteLink); var messageAction = memberModel.IsVisitor ? MessageAction.GuestCreated : MessageAction.UserCreated; MessageService.Send(messageAction, MessageTarget.Create(user.ID), user.DisplayUserName(false, DisplayUserSettingsHelper)); diff --git a/products/ASC.People/Server/Models/MemberModel.cs b/products/ASC.People/Server/Models/MemberModel.cs index 1e5e0d048d..085a9d6a6e 100644 --- a/products/ASC.People/Server/Models/MemberModel.cs +++ b/products/ASC.People/Server/Models/MemberModel.cs @@ -24,6 +24,7 @@ namespace ASC.People.Models public string Files { get; set; } public string Password { get; set; } public string PasswordHash { get; set; } + public bool FromInviteLink { get; set; } } public class UpdateMemberModel : MemberModel