mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e98c0a62e3
@ -52,6 +52,8 @@ export function BarChart({
|
|||||||
return dateFormat(d, 'MMM d', locale);
|
return dateFormat(d, 'MMM d', locale);
|
||||||
case 'month':
|
case 'month':
|
||||||
return dateFormat(d, 'MMM', locale);
|
return dateFormat(d, 'MMM', locale);
|
||||||
|
case 'year':
|
||||||
|
return dateFormat(d, 'YYY', locale);
|
||||||
default:
|
default:
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import useMessages from 'hooks/useMessages';
|
|||||||
export function TeamLeaveForm({ teamId, userId, teamName, onSave, onClose }) {
|
export function TeamLeaveForm({ teamId, userId, teamName, onSave, onClose }) {
|
||||||
const { formatMessage, labels, messages, FormattedMessage } = useMessages();
|
const { formatMessage, labels, messages, FormattedMessage } = useMessages();
|
||||||
const { del, useMutation } = useApi();
|
const { del, useMutation } = useApi();
|
||||||
const { mutate, error, isLoading } = useMutation(() => del(`/team/${teamId}/users/${userId}`));
|
const { mutate, error, isLoading } = useMutation(() => del(`/teams/${teamId}/users/${userId}`));
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
mutate(
|
mutate(
|
||||||
@ -22,7 +22,7 @@ export function TeamLeaveForm({ teamId, userId, teamName, onSave, onClose }) {
|
|||||||
return (
|
return (
|
||||||
<Form onSubmit={handleSubmit} error={error}>
|
<Form onSubmit={handleSubmit} error={error}>
|
||||||
<p>
|
<p>
|
||||||
<FormattedMessage {...messages.confirmLeave} values={{ name: <b>{teamName}</b> }} />
|
<FormattedMessage {...messages.confirmDelete} values={{ target: <b>{teamName}</b> }} />
|
||||||
</p>
|
</p>
|
||||||
<FormButtons flex>
|
<FormButtons flex>
|
||||||
<SubmitButton variant="danger" disabled={isLoading}>
|
<SubmitButton variant="danger" disabled={isLoading}>
|
||||||
|
@ -5,7 +5,7 @@ import { Icon, Icons, LoadingButton, Text } from 'react-basics';
|
|||||||
export function TeamMemberRemoveButton({ teamId, userId, disabled, onSave }) {
|
export function TeamMemberRemoveButton({ teamId, userId, disabled, onSave }) {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
const { del, useMutation } = useApi();
|
const { del, useMutation } = useApi();
|
||||||
const { mutate, isLoading } = useMutation(() => del(`/team/${teamId}/users/${userId}`));
|
const { mutate, isLoading } = useMutation(() => del(`/teams/${teamId}/users/${userId}`));
|
||||||
|
|
||||||
const handleRemoveTeamMember = () => {
|
const handleRemoveTeamMember = () => {
|
||||||
mutate(
|
mutate(
|
||||||
|
@ -50,7 +50,7 @@ export default async (
|
|||||||
|
|
||||||
return ok(res, {
|
return ok(res, {
|
||||||
token,
|
token,
|
||||||
user: { id: user.id, username: user.username, createdAt: user.createdAt },
|
user: { id: user.id, username: user.username, role: user.role, createdAt: user.createdAt },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user