ENG-482 fix

This commit is contained in:
mijauexe
2025-03-04 15:14:09 +01:00
parent b9cb4ddf22
commit 26c8f0e2a4
3 changed files with 7 additions and 13 deletions

View File

@@ -492,6 +492,10 @@ class ProjectState(Base):
"""
return self.epics and any(epic.get("source") == "frontend" for epic in self.epics)
# function that checks whether old project or new project is currently in frontend stage
def working_on_frontend(self) -> bool:
return self.has_frontend() and len(self.epics) == 1
def is_feature(self) -> bool:
"""
Check if the current epic is a feature.

View File

@@ -20,9 +20,12 @@ These files are currently implemented on the frontend that contain all API reque
{% if not state.has_frontend() or (state.has_frontend() and 'server/' not in file.path) %}
* `{{ file.path }}{% if file.meta.get("description") %}: {{file.meta.description}}{% endif %}`
{% endif %}{% endfor %}
{% if not state.working_on_frontend() %}
These files are currently implemented in the project on the backend:
{% for file in state.files %}{% if 'server/' in file.path %}
* `{{ file.path }}{% if file.meta.get("description") %}: {{file.meta.description}}{% endif %}`
{% endif %}{% endfor %}
{% endif %}
{% endif %}

View File

@@ -107,28 +107,15 @@ class ViteReactProjectTemplate(BaseProjectTemplate):
relevant_files = [
"server/server.js",
"server/routes/index.js",
"client/components.json",
"client/index.html",
"client/package.json",
"client/src/api/api.ts",
"client/src/app.css",
"client/src/App.tsx",
"client/src/components/Footer.tsx",
"client/src/components/Header.tsx",
"client/src/components/Layout.tsx",
"client/src/components/ProtectedRoute.tsx",
"client/src/contexts/AuthContext.tsx",
"client/src/pages/Login.tsx",
"client/src/pages/Register.tsx",
"client/src/index.css",
"client/src/lib/utils.ts",
"client/src/main.tsx",
"client/src/vite-env.d.ts",
"client/tailwind.config.js",
"client/tsconfig.app.json",
"client/tsconfig.json",
"client/tsconfig.node.json",
"client/vite.config.ts",
"package.json",
]