-
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
Showing
19 changed files
with
655 additions
and
537 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { FieldDataType } from "../sharedTypes"; | ||
|
||
type ChartListProps = { | ||
list: FieldDataType[] | []; | ||
handleLoadChart: (item: FieldDataType) => void; | ||
handleDeleteChart: (id: string) => void; | ||
}; | ||
|
||
export default function ChartList({ | ||
list, | ||
handleLoadChart, | ||
handleDeleteChart, | ||
}: ChartListProps) { | ||
return ( | ||
<div className=""> | ||
{list?.map((item) => ( | ||
<div key={item.id} className="my-2 flex gap-2 items-center border p-2"> | ||
<div className="grow flex flex-col"> | ||
<div className="text-lg">{item.name}</div> | ||
<small | ||
className={`text-xxs text-content opacity-70 pr-4 ${ | ||
item.publish ? "text-success" : "text-content" | ||
}`} | ||
> | ||
{item.publish ? "public" : "private"} | ||
</small> | ||
</div> | ||
{item.publish && ( | ||
<a | ||
className="btn btn-outline btn-success btn-sm" | ||
target="_blank" | ||
href={`/chart/${item.id}`} | ||
> | ||
view | ||
</a> | ||
)} | ||
<button | ||
className="btn btn-outline btn-primary btn-sm" | ||
onClick={() => handleLoadChart(item)} | ||
> | ||
load | ||
</button> | ||
<button | ||
className="btn btn-outline btn-error btn-sm" | ||
onClick={() => handleDeleteChart(item.id || "")} | ||
> | ||
delete | ||
</button> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} |
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,8 @@ | ||
export default function Loading() { | ||
return ( | ||
<div className="my-10 gap-2 text-primary flex"> | ||
<span className="text-primary text-2xl uppercase">Loading</span> | ||
<span className="loading loading-dots loading-lg" /> | ||
</div> | ||
); | ||
} |
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,26 @@ | ||
export default function QuickstartInfo() { | ||
return ( | ||
<div className="my-5 prose"> | ||
<h3>Quickstart</h3> If you want start quickly you can generate some dummy | ||
data for test purpose from the section{" "} | ||
<a className="link link-primary" href="/generate-data"> | ||
Generate Data | ||
</a>{" "} | ||
or from the section{" "} | ||
<a className="link link-primary" href="/load-data"> | ||
Load Data | ||
</a>{" "} | ||
and download th data in CSV format. Then you can upload the data e create | ||
a new chart. | ||
<h3>How to use:</h3> | ||
follow these steps to create a new chart: | ||
<ul> | ||
<li>Click on "Create New Chart" to start</li> | ||
<li>Upload your data</li> | ||
<li>Configure your chart</li> | ||
<li>Save your chart</li> | ||
</ul> | ||
<hr /> | ||
</div> | ||
); | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.