Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📅 Action Scheduler #57

Merged
merged 62 commits into from
Sep 7, 2023
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3fd3b78
Updated the WorldManager.java
gnmyt Sep 3, 2023
e7942aa
Created the ScheduleActionType enum
gnmyt Sep 6, 2023
b6b9bb2
Created the ScheduleFrequency enum
gnmyt Sep 6, 2023
283fb22
Created the ScheduleAction.java
gnmyt Sep 6, 2023
b4fe8e1
Created the ScheduleExecution.java
gnmyt Sep 6, 2023
15279d3
Created the Schedule.java entity
gnmyt Sep 6, 2023
9917eea
Created the ScheduleController.java
gnmyt Sep 6, 2023
90638af
Created the ScheduleManager.java
gnmyt Sep 6, 2023
0ef1fc2
Extracted the mode string function in the BackupRoute.java
gnmyt Sep 6, 2023
ab86ef2
Removed semicolon from the ScheduleFrequency enum
gnmyt Sep 6, 2023
fb95dd4
Created the ScheduleRoute.java
gnmyt Sep 6, 2023
c78f676
Created the ScheduleActionRoute.java
gnmyt Sep 6, 2023
d8f1999
Created the ScheduleExecutionRoute.java
gnmyt Sep 6, 2023
c3333f6
Created the ScheduleNameRoute.java
gnmyt Sep 6, 2023
14a14ac
Implemented the ScheduleManager into the MinecraftDashboard.java
gnmyt Sep 6, 2023
65e81a7
Added the background > card color to the dark.js
gnmyt Sep 6, 2023
1b84b50
Added the background > card color to the light.js
gnmyt Sep 6, 2023
362c3e6
Fixed a bug in the BackupItem.jsx
gnmyt Sep 6, 2023
2c819ce
Implemented action editing in the BackupCreationDialog.jsx
gnmyt Sep 6, 2023
b3c436a
Created the EditActionDialog.jsx
gnmyt Sep 6, 2023
a797110
Created the EditActionDialog index.js
gnmyt Sep 6, 2023
1ea0d9f
Created the Action.jsx
gnmyt Sep 6, 2023
39b56bb
Created the Action index.js
gnmyt Sep 6, 2023
02ef8c2
Created the mappings.jsx
gnmyt Sep 6, 2023
ee02d22
Created the CreateActionDialog.jsx
gnmyt Sep 6, 2023
7325623
Created the CreateActionDialog index.js
gnmyt Sep 6, 2023
fd94cd8
Created the CreateScheduleDialog.jsx
gnmyt Sep 6, 2023
449471b
Created the CreateScheduleDialog index.js
gnmyt Sep 6, 2023
e13b96a
Created the Schedule.jsx
gnmyt Sep 6, 2023
f14c9a3
Created the Schedule index.js
gnmyt Sep 6, 2023
6d84cb7
Created the SchedulesContext.jsx
gnmyt Sep 6, 2023
a116149
Created the SchedulesContext index.js
gnmyt Sep 6, 2023
51c7dd7
Created the Scheduler.jsx page
gnmyt Sep 6, 2023
ab7d270
Created the Scheduler index.js
gnmyt Sep 6, 2023
709331a
Added the scheduler route to the server.jsx
gnmyt Sep 6, 2023
4c2a807
Added all schedule translations in the en.json
gnmyt Sep 6, 2023
6d5c7fb
Fixed a bug in the ScheduleController.java
gnmyt Sep 7, 2023
ff1981e
Extracted getDays from the CreateScheduleDialog.jsx
gnmyt Sep 7, 2023
b65eacf
Created the Schedule utils.js
gnmyt Sep 7, 2023
8aca689
Updated the Schedule.jsx
gnmyt Sep 7, 2023
137dc87
Added schedule translations to the en.json
gnmyt Sep 7, 2023
ed60899
Added "none found" to the Scheduler.jsx
gnmyt Sep 7, 2023
40de238
Added the none_created translation to the en.json
gnmyt Sep 7, 2023
fc17fda
Fixed the Scheduler.jsx
gnmyt Sep 7, 2023
f8822f9
Integrated editing in the CreateScheduleDialog.jsx
gnmyt Sep 7, 2023
78c80e2
Added the "Edit" translations to the en.json
gnmyt Sep 7, 2023
449a9ff
Added the edit button in the Schedule.jsx
gnmyt Sep 7, 2023
d708d18
Fixed a bug in the CreateScheduleDialog.jsx
gnmyt Sep 7, 2023
bf9fd9d
Added the KICK_ALL_PLAYERS type
gnmyt Sep 7, 2023
267654d
Integrated the KICK_ALL_PLAYERS logic
gnmyt Sep 7, 2023
ed11135
Updated the EditActionDialog.jsx
gnmyt Sep 7, 2023
c43261d
Updated the EditActionDialog mapping.jsx
gnmyt Sep 7, 2023
7d98cb4
Updated the CreateActionDialog.jsx
gnmyt Sep 7, 2023
943c0b5
Added the schedules.types.kick translation to the en.json
gnmyt Sep 7, 2023
a774b89
Updated the action translations in the en.json
gnmyt Sep 7, 2023
4fdb7ba
Updated the EditActionDialog.jsx
gnmyt Sep 7, 2023
c1f0f91
Updated the CreateActionDialog.jsx
gnmyt Sep 7, 2023
af6b87a
Optimized the Schedule.jsx for mobile devices
gnmyt Sep 7, 2023
2833cf6
Updated the Scheduler.jsx
gnmyt Sep 7, 2023
ce3bc2f
Fixed a bug in the Scheduler.jsx
gnmyt Sep 7, 2023
a2ebe10
Fixed a bug in the ScheduleController.java
gnmyt Sep 7, 2023
a1b2e4f
Fixed a bug in the ScheduleController.java
gnmyt Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added the edit button in the Schedule.jsx
  • Loading branch information
gnmyt committed Sep 7, 2023
commit 449a9ffdbaa7417e1bdbd1d24ff0676b8d43e18f
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Box, Button, Collapse, Stack, Typography} from "@mui/material";
import {AddTask, CalendarMonth, Delete, ExpandMore} from "@mui/icons-material";
import {AddTask, CalendarMonth, Delete, Edit, ExpandMore} from "@mui/icons-material";
import {useContext, useState} from "react";
import Action from "@/states/Root/pages/Scheduler/components/Action";
import CreateActionDialog from "@/states/Root/pages/Scheduler/components/CreateActionDialog";
Expand All @@ -8,11 +8,13 @@ import {SchedulesContext} from "@/states/Root/pages/Scheduler/contexts/Schedules
import ActionConfirmDialog from "@components/ActionConfirmDialog";
import {t} from "i18next";
import {convertFrequency} from "@/states/Root/pages/Scheduler/components/Schedule/utils.js";
import CreateScheduleDialog from "@/states/Root/pages/Scheduler/components/CreateScheduleDialog";

export const Schedule = ({name, execution, actions}) => {
const [open, setOpen] = useState(false);
const [dialogOpen, setDialogOpen] = useState(false);
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
const [editDialogOpen, setEditDialogOpen] = useState(false);

const {updateSchedules} = useContext(SchedulesContext);

Expand All @@ -32,6 +34,9 @@ export const Schedule = ({name, execution, actions}) => {
successMessage="none"
title={t("schedules.delete.title")} description={t("schedules.delete.text")}/>

<CreateScheduleDialog open={editDialogOpen} setOpen={setEditDialogOpen} edit currentName={name}
execution={execution}/>

<Stack direction="row" justifyContent="space-between" alignItems="center" onClick={() => setOpen(!open)}
style={{cursor: "pointer"}}>
<Stack direction="row" alignItems="center" gap={2}>
Expand All @@ -56,6 +61,8 @@ export const Schedule = ({name, execution, actions}) => {
{t("schedules.tasks.none_created")}</Typography>}

<Stack direction="row" gap={1} alignItems="center">
<Button variant="outlined" color="success" size="small" startIcon={<Edit/>}
onClick={() => setEditDialogOpen(true)}>{t("schedules.tasks.edit")}</Button>
<Button variant="outlined" color="error" size="small" startIcon={<Delete/>}
onClick={() => setDeleteDialogOpen(true)}>{t("schedules.tasks.delete")}</Button>
<Button variant="outlined" color="secondary" size="small" startIcon={<AddTask/>}
Expand Down