Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add toolCount to ServiceAssignment model and settings page. #187

Closed
DaveLuhman opened this issue May 18, 2024 · 0 comments · Fixed by #188
Closed

add toolCount to ServiceAssignment model and settings page. #187

DaveLuhman opened this issue May 18, 2024 · 0 comments · Fixed by #188

Comments

@DaveLuhman
Copy link
Owner

Problem:

Service assignments can be moved from active to inactive without having cleared all tools from the job. With the job marked as inactive, users won't know to go search under inactive jobsites to find the missing tools.

Solution:

added toolCount property to ServiceAssignment model, then scriptedly calculate the total number of tools for each SA once. This will run at the end of the tool import job so we start with good numbers, but will have to be done manually for any existing DB to get it up to snuff.

DaveLuhman added a commit that referenced this issue May 18, 2024
Subject: Enhance Service Assignment with Tool Count

Added 'toolCount' field to ServiceAssignment model for better resource tracking, enforcing a minimum value of 0 to ensure data integrity. Updated the enum values within the ServiceAssignment Schema to more accurately reflect the types of jobsites, changing 'Contract Job' and 'Service Job' to 'Contract Jobsite' and 'Service Jobsite,' respectively. This change clarifies the nature of the assignments in the system. Service assignment fetch operation is now more performance-efficient by using `.lean()` with the query to speed up data retrieval, beneficial for large datasets. Furthermore, the 'toolCount' field is now displayed in the service assignments settings view, with a visual emphasis on counts greater than zero, improving the user interface for site administrators by allowing quick identification of resource allocations per assignment.

This integration offers a detailed insight into the resource distribution across different service assignments, facilitating better planning and resource management.

Resolves:  add toolCount to ServiceAssignment model and settings page. #187
@DaveLuhman DaveLuhman linked a pull request May 18, 2024 that will close this issue
DaveLuhman added a commit that referenced this issue May 18, 2024
Subject: Enhance Service Assignment with Tool Count

Added 'toolCount' field to ServiceAssignment model for better resource tracking, enforcing a minimum value of 0 to ensure data integrity. Updated the enum values within the ServiceAssignment Schema to more accurately reflect the types of jobsites, changing 'Contract Job' and 'Service Job' to 'Contract Jobsite' and 'Service Jobsite,' respectively. This change clarifies the nature of the assignments in the system. Service assignment fetch operation is now more performance-efficient by using `.lean()` with the query to speed up data retrieval, beneficial for large datasets. Furthermore, the 'toolCount' field is now displayed in the service assignments settings view, with a visual emphasis on counts greater than zero, improving the user interface for site administrators by allowing quick identification of resource allocations per assignment.

This integration offers a detailed insight into the resource distribution across different service assignments, facilitating better planning and resource management.

Resolves:  add toolCount to ServiceAssignment model and settings page. #187
DaveLuhman added a commit that referenced this issue May 18, 2024
* toolCountChanges

Subject: Enhance Service Assignment with Tool Count

Added 'toolCount' field to ServiceAssignment model for better resource tracking, enforcing a minimum value of 0 to ensure data integrity. Updated the enum values within the ServiceAssignment Schema to more accurately reflect the types of jobsites, changing 'Contract Job' and 'Service Job' to 'Contract Jobsite' and 'Service Jobsite,' respectively. This change clarifies the nature of the assignments in the system. Service assignment fetch operation is now more performance-efficient by using `.lean()` with the query to speed up data retrieval, beneficial for large datasets. Furthermore, the 'toolCount' field is now displayed in the service assignments settings view, with a visual emphasis on counts greater than zero, improving the user interface for site administrators by allowing quick identification of resource allocations per assignment.

This integration offers a detailed insight into the resource distribution across different service assignments, facilitating better planning and resource management.

Resolves:  add toolCount to ServiceAssignment model and settings page. #187

* missed local env var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant