feat: add last deployment date to services and update sorting logic

- Introduced `lastDeployDate` property to track the most recent deployment for applications and compose services.
- Updated the `extractServicesFromEnvironment` function to calculate and include the last deployment date.
- Modified sorting logic to allow sorting by last deployment date, enhancing the user experience on the environment dashboard.
- Adjusted local storage default sort preference to prioritize last deployment date.
This commit is contained in:
Mauricio Siu
2025-11-13 22:35:16 -06:00
parent 62474c1222
commit d549aa6a62
2 changed files with 108 additions and 25 deletions

View File

@@ -34,13 +34,21 @@ export const findEnvironmentById = async (environmentId: string) => {
const environment = await db.query.environments.findFirst({
where: eq(environments.environmentId, environmentId),
with: {
applications: true,
applications: {
with: {
deployments: true,
},
},
mariadb: true,
mongo: true,
mysql: true,
postgres: true,
redis: true,
compose: true,
compose: {
with: {
deployments: true,
},
},
project: true,
},
});