-
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
5decb76
commit f73c35b
Showing
7 changed files
with
94 additions
and
129 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 |
---|---|---|
@@ -1,55 +1,44 @@ | ||
import datetime | ||
from typing import Optional | ||
from pm_kun.pmgpt.main import generate_response | ||
from pm_kun.screen.main import main as Screen | ||
from pm_kun.task.todo import BaseTask | ||
from pm_kun.type_definition import Priority, Status, ToDo | ||
import uuid | ||
import flet as ft | ||
from pm_kun.screen.bord import view_chart | ||
from pm_kun.screen.home import view_home | ||
from pm_kun.screen.pmk import pmk | ||
from pm_kun.screen.task import view_task | ||
|
||
# TODO: PMK画面の実装を完成させる | ||
|
||
def main() -> None: | ||
print("This is Entory point for pm-kun.") | ||
is_process = False | ||
my_task = BaseTask() | ||
|
||
def main(page: ft.Page) -> None: | ||
# question = input("質問を入力してください") | ||
# context = input("コンテキストを入力してください") | ||
# print(generate_response(user_input=question, user_context=context)) | ||
Screen | ||
# while is_process: | ||
# print("1.タスクの追加") | ||
# print("2.タスクの削除") | ||
# print("3.タスクの更新") | ||
# print("4.終了") | ||
# select = input("選択してください") | ||
# if select == "1": | ||
# task = input("タスクを入力してください") | ||
# my_Todo: ToDo = { | ||
# "id": str(uuid.uuid4()), | ||
# "task": "", | ||
# "status": Status.未着手, | ||
# "period": datetime.date.today(), | ||
# "priority": Priority.低, | ||
# } | ||
# my_Todo["id"] = str(uuid.uuid4()) | ||
# my_Todo["task"] = task | ||
# my_task.add_task(my_Todo) | ||
# print(f"TODOの数:{len(my_task.todo_list)}") | ||
# print(my_task.todo_list) | ||
# elif select == "2": | ||
# task = input("削除するタスクを入力してください") | ||
# for todo in my_task.todo_list: | ||
# if task in todo["task"]: | ||
# id = todo["id"] | ||
# my_task.delete_task(id) | ||
# print(my_task.todo_list) | ||
# elif select == "3": | ||
# cuurent_task = input("更新するタスクを入力してください") | ||
# update_task = input("更新後のタスクを入力してください") | ||
# for todo in my_task.todo_list: | ||
# if cuurent_task in todo["task"]: | ||
# id = todo["id"] | ||
# my_task.update_task(id, task=update_task) | ||
# print(my_task.todo_list) | ||
# elif select == "4": | ||
# break | ||
page.title = "プロマネ君" | ||
page.window_width = 1050 | ||
page.window_height = 800 | ||
page.data = [] | ||
|
||
def route_change(route) -> None: | ||
page.views.clear() | ||
page.views.append(view_home(page)) | ||
if page.route == "/todo": | ||
page.views.append(view_task(page)) | ||
if page.route == "/chart": | ||
page.views.append(view_chart(page)) | ||
if page.route == "/pmk": | ||
page.views.append(pmk(page)) | ||
page.update() | ||
|
||
def view_pop(view) -> None: | ||
page.views.pop() | ||
top_view = page.views[-1] | ||
page.go(top_view.route) | ||
|
||
page.on_route_change = route_change | ||
page.on_view_pop = view_pop | ||
page.go(page.route) | ||
|
||
|
||
ft.app(target=main) | ||
|
||
if __name__ == "__main__": | ||
ft.app(target=main) |
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
This file was deleted.
Oops, something went wrong.
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