-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04583ea
commit 1aaea88
Showing
9 changed files
with
224 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import { useState } from "react"; | ||
import { | ||
Dialog, | ||
DialogTrigger, | ||
DialogContent, | ||
DialogHeader, | ||
DialogDescription, | ||
DialogClose, | ||
DialogFooter, | ||
DialogTitle, | ||
} from "@/widgets/ui/dialog"; | ||
|
||
function AddTimings() { | ||
const [formData, setFormData] = useState([]); | ||
return ( | ||
<Dialog> | ||
<DialogTrigger>Add</DialogTrigger> | ||
<DialogContent> | ||
<DialogHeader> | ||
<DialogTitle className="text-xl text-gray-900"> | ||
Add Time Slots | ||
</DialogTitle> | ||
<DialogDescription className="grid grid-cols-3"></DialogDescription> | ||
<DialogFooter> | ||
<DialogClose className="bg-zinc-600 text-white px-3 py-1 rounded-md text-sm"> | ||
Close | ||
</DialogClose> | ||
<button className="bg-ternary text-white px-3 py-1 rounded-md"> | ||
Save | ||
</button> | ||
</DialogFooter> | ||
</DialogHeader> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
} | ||
|
||
export default AddTimings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const formatTime = (time) => { | ||
const parsedTime = new Date("2000-01-01T" + time); | ||
const hours = parsedTime.getHours(); | ||
const minutes = parsedTime.getMinutes(); | ||
const formattedHours = hours % 12 || 12; | ||
const ampm = hours < 12 ? "AM" : "PM"; | ||
const formattedMinutes = minutes < 10 ? "0" + minutes : minutes; | ||
const formattedTime = `${formattedHours}:${formattedMinutes} ${ampm}`; | ||
|
||
return formattedTime; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.