dialogs
This commit is contained in:
1 parent
4525f8035b
commit
a3f7ac8ae3
5 files changed
+12
-7
No files matched your search
@@ -151,6 +151,7 @@ const MaintenancePage = () => {
|
|||||||
open={open}
|
open={open}
|
||||||
onConfirm={handleConfirm}
|
onConfirm={handleConfirm}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
|
loading={isDeleting}
|
||||||
/>
|
/>
|
||||||
</BasePageWithStates>
|
</BasePageWithStates>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const NotificationChannelsPage = () => {
|
|||||||
>("/notification-channels", {}, {});
|
>("/notification-channels", {}, {});
|
||||||
|
|
||||||
const { patch, loading: pausing } = usePatch<{}, INotificationChannel>();
|
const { patch, loading: pausing } = usePatch<{}, INotificationChannel>();
|
||||||
const { deleteFn, loading: deleting } =
|
const { deleteFn, loading: isDeleting } =
|
||||||
useDelete<ApiResponse<INotificationChannel>>();
|
useDelete<ApiResponse<INotificationChannel>>();
|
||||||
|
|
||||||
const notificationChannels = response?.data || [];
|
const notificationChannels = response?.data || [];
|
||||||
@@ -138,7 +138,7 @@ const NotificationChannelsPage = () => {
|
|||||||
/>
|
/>
|
||||||
<HeaderCreate
|
<HeaderCreate
|
||||||
label={"Create a new notification channel"}
|
label={"Create a new notification channel"}
|
||||||
isLoading={isValidating || pausing || deleting}
|
isLoading={isValidating || pausing || isDeleting}
|
||||||
path="/notification-channels/create"
|
path="/notification-channels/create"
|
||||||
entitlement={"notificationChannelsMax"}
|
entitlement={"notificationChannelsMax"}
|
||||||
entitlementCount={notificationChannels.length}
|
entitlementCount={notificationChannels.length}
|
||||||
@@ -157,6 +157,7 @@ const NotificationChannelsPage = () => {
|
|||||||
open={open}
|
open={open}
|
||||||
onConfirm={handleConfirm}
|
onConfirm={handleConfirm}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
|
loading={isDeleting}
|
||||||
/>
|
/>
|
||||||
</BasePageWithStates>
|
</BasePageWithStates>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const StatusPages = () => {
|
|||||||
|
|
||||||
const statusPages = response?.data || [];
|
const statusPages = response?.data || [];
|
||||||
|
|
||||||
const { deleteFn, loading: deleting } = useDelete<any>();
|
const { deleteFn, loading: isDeleting } = useDelete<any>();
|
||||||
|
|
||||||
const getActions = (statusPage: IStatusPage): ActionMenuItem[] => {
|
const getActions = (statusPage: IStatusPage): ActionMenuItem[] => {
|
||||||
return [
|
return [
|
||||||
@@ -122,7 +122,7 @@ const StatusPages = () => {
|
|||||||
/>
|
/>
|
||||||
<HeaderCreate
|
<HeaderCreate
|
||||||
label={"Create a new Status Page"}
|
label={"Create a new Status Page"}
|
||||||
isLoading={isValidating || deleting}
|
isLoading={isValidating || isDeleting}
|
||||||
path="/status-pages/create"
|
path="/status-pages/create"
|
||||||
entitlement="statusPagesMax"
|
entitlement="statusPagesMax"
|
||||||
entitlementCount={statusPages.length}
|
entitlementCount={statusPages.length}
|
||||||
@@ -141,6 +141,7 @@ const StatusPages = () => {
|
|||||||
open={open}
|
open={open}
|
||||||
onConfirm={handleConfirm}
|
onConfirm={handleConfirm}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
|
loading={isDeleting}
|
||||||
/>
|
/>
|
||||||
</BasePageWithStates>
|
</BasePageWithStates>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { mutate } from "swr";
|
|||||||
|
|
||||||
const TeamMemberConfig = () => {
|
const TeamMemberConfig = () => {
|
||||||
const [dialogOpen, setDialogOpen] = useState<boolean>(false);
|
const [dialogOpen, setDialogOpen] = useState<boolean>(false);
|
||||||
const { deleteFn, loading: deleting } = useDelete();
|
const { deleteFn, loading: isDeleting } = useDelete();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { id, memberId } = useParams();
|
const { id, memberId } = useParams();
|
||||||
@@ -65,7 +65,7 @@ const TeamMemberConfig = () => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
color="error"
|
color="error"
|
||||||
onClick={() => setDialogOpen(true)}
|
onClick={() => setDialogOpen(true)}
|
||||||
disabled={deleting}
|
disabled={isDeleting}
|
||||||
>
|
>
|
||||||
{t("delete")}
|
{t("delete")}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -78,6 +78,7 @@ const TeamMemberConfig = () => {
|
|||||||
content={"Delete team member"}
|
content={"Delete team member"}
|
||||||
onConfirm={handleConfirm}
|
onConfirm={handleConfirm}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
|
loading={isDeleting}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const TeamsPage = () => {
|
|||||||
const isDialogOpen = Boolean(selectedTeam);
|
const isDialogOpen = Boolean(selectedTeam);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { response, loading, refetch } = useGet<ApiResponse<any>>("/teams");
|
const { response, loading, refetch } = useGet<ApiResponse<any>>("/teams");
|
||||||
const { deleteFn } = useDelete();
|
const { deleteFn, loading: isDeleting } = useDelete();
|
||||||
const teams = response?.data || [];
|
const teams = response?.data || [];
|
||||||
|
|
||||||
const handleConfirm = async () => {
|
const handleConfirm = async () => {
|
||||||
@@ -109,6 +109,7 @@ const TeamsPage = () => {
|
|||||||
content={t("deleteDialogDescription")}
|
content={t("deleteDialogDescription")}
|
||||||
onConfirm={handleConfirm}
|
onConfirm={handleConfirm}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
|
loading={isDeleting}
|
||||||
/>
|
/>
|
||||||
</BasePage>
|
</BasePage>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user