Add Moodle + Pohoda connectors

- Moodle: courses->goals, assignments->tasks, completion, grades, webhook
- Pohoda: XML-RPC adapter, invoice sync, webhook
- All 3 connectors (Odoo, Moodle, Pohoda) returning 200

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude CLI Agent
2026-03-29 12:56:50 +00:00
parent aa5cb5f733
commit 6c38c9438f
7 changed files with 176 additions and 306 deletions

View File

@@ -7,13 +7,13 @@ interface StatusBadgeProps {
const STATUS_MAP: Record<string, { label: string; bg: string; text: string; dot: string }> = {
pending: {
label: "\u010Cek\u00e1",
label: "Čeká",
bg: "bg-yellow-100 dark:bg-yellow-900/30",
text: "text-yellow-800 dark:text-yellow-300",
dot: "bg-yellow-500",
},
in_progress: {
label: "Prob\u00edh\u00e1",
label: "Probíhá",
bg: "bg-blue-100 dark:bg-blue-900/30",
text: "text-blue-800 dark:text-blue-300",
dot: "bg-blue-500",
@@ -31,7 +31,7 @@ const STATUS_MAP: Record<string, { label: string; bg: string; text: string; dot:
dot: "bg-green-500",
},
cancelled: {
label: "Zru\u0161eno",
label: "Zrušeno",
bg: "bg-gray-100 dark:bg-gray-800/30",
text: "text-gray-600 dark:text-gray-400",
dot: "bg-gray-400",

View File

@@ -12,17 +12,17 @@ interface TaskFormProps {
}
const STATUSES = [
{ value: "pending", label: "\u010Cek\u00e1" },
{ value: "in_progress", label: "Prob\u00edh\u00e1" },
{ value: "pending", label: "Čeká" },
{ value: "in_progress", label: "Probíhá" },
{ value: "done", label: "Hotovo" },
{ value: "cancelled", label: "Zru\u0161eno" },
{ value: "cancelled", label: "Zrušeno" },
];
const PRIORITIES = [
{ value: "low", label: "N\u00edzk\u00e1" },
{ value: "medium", label: "St\u0159edn\u00ed" },
{ value: "high", label: "Vysok\u00e1" },
{ value: "urgent", label: "Urgentn\u00ed" },
{ value: "low", label: "Nízká" },
{ value: "medium", label: "Střední" },
{ value: "high", label: "Vysoká" },
{ value: "urgent", label: "Urgentní" },
];
export default function TaskForm({
@@ -30,7 +30,7 @@ export default function TaskForm({
initial,
onSubmit,
onCancel,
submitLabel = "Ulo\u017eit",
submitLabel = "Uložit",
}: TaskFormProps) {
const [title, setTitle] = useState(initial?.title || "");
const [description, setDescription] = useState(initial?.description || "");
@@ -46,7 +46,7 @@ export default function TaskForm({
async function handleSubmit(e: React.FormEvent) {
e.preventDefault();
if (!title.trim()) {
setError("N\u00e1zev je povinn\u00fd");
setError("Název je povinný");
return;
}
setLoading(true);
@@ -62,7 +62,7 @@ export default function TaskForm({
});
} catch (err) {
setError(
err instanceof Error ? err.message : "Chyba p\u0159i ukl\u00e1d\u00e1n\u00ed"
err instanceof Error ? err.message : "Chyba při ukládání"
);
} finally {
setLoading(false);
@@ -78,13 +78,13 @@ export default function TaskForm({
)}
<div>
<label className="block text-sm font-medium mb-1">N\u00e1zev *</label>
<label className="block text-sm font-medium mb-1">Název *</label>
<input
type="text"
value={title}
onChange={(e) => setTitle(e.target.value)}
className="w-full px-3 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-shadow"
placeholder="Co je t\u0159eba ud\u011blat..."
placeholder="Co je třeba udělat..."
autoFocus
/>
</div>
@@ -158,7 +158,7 @@ export default function TaskForm({
</div>
<div>
<label className="block text-sm font-medium mb-1">Term\u00edn</label>
<label className="block text-sm font-medium mb-1">Termín</label>
<input
type="datetime-local"
value={dueAt}
@@ -174,14 +174,14 @@ export default function TaskForm({
disabled={loading}
className="flex-1 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2.5 px-4 rounded-lg transition-colors disabled:opacity-50 min-h-[44px]"
>
{loading ? "Ukl\u00e1d\u00e1m..." : submitLabel}
{loading ? "Ukládám..." : submitLabel}
</button>
<button
type="button"
onClick={onCancel}
className="px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors min-h-[44px]"
>
Zru\u0161it
Zrušit
</button>
</div>
</form>

View File

@@ -41,7 +41,7 @@ export default function TaskModal({ groups, onSubmit, onClose }: TaskModalProps)
className="fixed inset-0 z-50 flex items-end sm:items-center justify-center"
role="dialog"
aria-modal="true"
aria-label="Nov\u00fd \u00fakol"
aria-label="Nový úkol"
>
{/* Backdrop */}
<div
@@ -65,11 +65,11 @@ export default function TaskModal({ groups, onSubmit, onClose }: TaskModalProps)
</div>
<div className="flex items-center justify-between mb-5">
<h2 className="text-lg font-semibold">Nov\u00fd \u00fakol</h2>
<h2 className="text-lg font-semibold">Nový úkol</h2>
<button
onClick={handleClose}
className="p-2 rounded-lg text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors min-w-[44px] min-h-[44px] flex items-center justify-center"
aria-label="Zav\u0159\u00edt"
aria-label="Zavřít"
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -90,7 +90,7 @@ export default function TaskModal({ groups, onSubmit, onClose }: TaskModalProps)
groups={groups}
onSubmit={onSubmit}
onCancel={handleClose}
submitLabel="Vytvo\u0159it"
submitLabel="Vytvořit"
/>
</div>
</div>