Esempio n. 1
0
        public async Task Execute(IDispatcher dispatcher, IdentityViewModel identity)
        {
            await _client.Delete <IdentityViewModel>(identity.Id);

            // TODO: instead of refresh delete?
            await dispatcher.Dispatch <FetchIdentities>();
        }
Esempio n. 2
0
        public async Task Execute(IDispatcher dispatcher, TeamMemberViewModel member)
        {
            await _client.Delete <TeamMemberViewModel>(member.Id);

            // TODO: instead of refresh delete?
            await dispatcher.Dispatch <FetchMembers>();
        }
Esempio n. 3
0
        public async Task Execute(IDispatcher dispatcher, ProfileViewModel profile)
        {
            await _client.Delete <ProfileViewModel>(profile.Id);

            // TODO: instead of refresh delete?
            await dispatcher.Dispatch <FetchProfiles>();

            await _jsUtils.NotifySuccess("Delete", $"Profile {profile.Name} was deleted successfully.");
        }
Esempio n. 4
0
        public async Task Execute(IDispatcher dispatcher, VstsRepositoryViewModel repository)
        {
            await _client.Delete <VstsRepositoryViewModel>(repository.Id);

            // TODO: instead of refresh delete?
            await dispatcher.Dispatch <FetchRepositories>();

            await _jsUtils.NotifySuccess("Delete", $"Repository {repository.Name} was deleted successfully.");
        }
Esempio n. 5
0
        public async Task Execute(IDispatcher dispatcher, OrganizationViewModel organization)
        {
            await Utils.ExecuteWithLoading(dispatcher, async() =>
            {
                await _client.Delete <OrganizationViewModel>(organization.Id);
            });

            // TODO: instead of refresh delete?
            await dispatcher.Dispatch <FetchOrganizations>();
        }
Esempio n. 6
0
        public async Task Execute(IDispatcher dispatcher, ProfileViewModel profile)
        {
            await Utils.ExecuteWithLoading(dispatcher, async() =>
            {
                await _client.Delete <ProfileViewModel>(profile.Id);
            });

            // TODO: instead of refresh delete?
            await dispatcher.Dispatch <FetchProfiles>();

            _toaster.Add($"Profile {profile.Name} was deleted successfully.", MatToastType.Success, "Delete", MatIconNames.Delete);
        }
Esempio n. 7
0
        public async Task Execute(IDispatcher dispatcher, VstsRepositoryViewModel repository)
        {
            await Utils.ExecuteWithLoading(dispatcher, async() =>
            {
                await _client.Delete <VstsRepositoryViewModel>(repository.Id);
            });

            // TODO: instead of refresh delete?
            await dispatcher.Dispatch <FetchRepositories>();

            _toaster.Add($"Repository {repository.Name} was deleted successfully.", MatToastType.Success, "Delete", MatIconNames.Delete);
        }
Esempio n. 8
0
        public async Task Execute(IDispatcher dispatcher, ReportViewModel report)
        {
            try
            {
                await _client.Delete <ReportViewModel>(report.Id);

                await dispatcher.Dispatch <FetchReports>();

                await _jsUtils.NotifySuccess("Report deleted", $"{report.ReportType} was deleted successfully.");
            }
            catch (System.Exception ex)
            {
                await _jsUtils.NotifyError("Error deleting report", $"{ex.Message}");
            }
        }
Esempio n. 9
0
        public async Task Execute(IDispatcher dispatcher, ReportViewModel report)
        {
            try
            {
                await Utils.ExecuteWithLoading(dispatcher, async() =>
                {
                    await _client.Delete <ReportViewModel>(report.Id);
                });

                await dispatcher.Dispatch <FetchReports>();

                _toaster.Add($"{report.ReportType} was deleted successfully.", MatToastType.Success, "Report deleted", MatIconNames.Delete);
            }
            catch (System.Exception ex)
            {
                _toaster.Add(ex.Message, MatToastType.Danger, "Error deleting report", MatIconNames.Error);
            }
        }