Company Project Visibility - #1657
Conversation
…staff to view drafts for editing
Submission/Messages button correct level - Process Requirement level Breadcrumbs /bands for Edit / Complete Checklist Split CompletedModules into folder View Arches - Icon for arches core Search looking icon - View Arches icon = Internal Dashboard
Use dropdown list for actions - Edit Checklist put it in dots on Filing Summary Wire in unread counts for Drafts on backend Wire in external dashboard draft call, wasn't wired Drafts filter for External dashboard
…a bit more fluid without having to reload
| }, | ||
| "id": "d814b48e-18f2-44ef-b8fa-3dba3244f24e", | ||
| "label": { | ||
| "en": "Owning Organization" |
There was a problem hiding this comment.
This is in drafts as well
| def company_contributor_ids(self, username): | ||
| """The viewer plus the active members of every org the viewer actively | ||
| belongs to today, excluding any flagged inactive.""" | ||
| if not username: | ||
| return set() | ||
| my_contributor_id = self.username_contributor_id(username) | ||
| if not my_contributor_id: | ||
| return set() | ||
|
|
||
| org_node = self.node_id( | ||
| GraphSlugs.CONTRIBUTOR, ContributorAliases.ASSOCIATED_ORGANIZATION | ||
| ) | ||
| start_node = self.node_id(GraphSlugs.CONTRIBUTOR, ContributorAliases.START_DATE) | ||
| end_node = self.node_id(GraphSlugs.CONTRIBUTOR, ContributorAliases.END_DATE) | ||
| membership_ng = self._node_info( | ||
| GraphSlugs.CONTRIBUTOR, ContributorAliases.ASSOCIATED_ORGANIZATION | ||
| )[1] | ||
| today = timezone.now().date().isoformat() |
There was a problem hiding this comment.
moved to organization id or deleted
| DRAFTS_CREATED_BY_ME = "DRAFTS_CREATED_BY_ME", "My drafts" | ||
| DRAFTS_BY_ASSOCIATED_ORGANIZATIONS = ( | ||
| "DRAFTS_BY_ASSOCIATED_ORGANIZATIONS", | ||
| "Drafts of associated organizations", | ||
| ) | ||
| FILINGS_CREATED_BY_ME = "FILINGS_CREATED_BY_ME", "My filings" | ||
| FILINGS_BY_ASSOCIATED_ORGANIZATIONS = ( | ||
| "FILINGS_BY_ASSOCIATED_ORGANIZATIONS", | ||
| "Filings of associated organizations", | ||
| ) |
There was a problem hiding this comment.
new types toggled by external dash checkbox + filings + draft tab
| @@ -1,30 +1,27 @@ | |||
| """Draft storage as resources of the standalone 'drafts' graph, one JSON blob | |||
There was a problem hiding this comment.
It looks like the user persisted in the edit_log is always admin, not the user that saves it. Are you seeing this locally too? Debugging the create/set_data functions, the user parameter is coming in as me (userid 5) but the value in the edit log is 1.
| await Promise.all([ | ||
| fetchDraftCards(), | ||
| fetchCompanyDraftCards(), | ||
| fetchMyProjects(), | ||
| fetchCompanyProjects(), | ||
| ]); |
There was a problem hiding this comment.
we grab these all at once, on the internal dashboard we just grab when we switch to the tab
I think that's ok
There was a problem hiding this comment.
might get heavy depending on how big a company is.
|
I'm kind of thinking we might want to move the frontend unit tests files into a test directory |
| ApiPermitApplicationDestroyData, | ||
| ApiPermitApplicationDestroyResponse, | ||
| ApiPermitApplicationDestroyResponses, |
| ApiPermitApplicationUpdateData, | ||
| ApiPermitApplicationUpdateResponse, | ||
| ApiPermitApplicationUpdateResponses, |
There was a problem hiding this comment.
PUT removal, we might need this back in when we edit
| verbs by http_method_names. | ||
| """ | ||
|
|
||
| http_method_names = ["get", "head", "options"] |
There was a problem hiding this comment.
follows generate.json now
| "permit_application": [ | ||
| "GET", | ||
| "PUT", | ||
| "PATCH", |
There was a problem hiding this comment.
possibly put PUT back in when editing, I don't think we'll need delete for now?
There was a problem hiding this comment.
Covered by other unit tests, also there are 400+ unit tests for cross model advanced search alone.
We can add the TestCase class and they will be picked up by the Django unit test runner and take only 0.7s to execute on my machine - should we add those? it will almost double the unit test count
| "arches-querysets @ git+https://github.com/bcgov/arches-querysets@performance_fix_geojson", | ||
| "arches-workflow-stepper @ git+https://github.com/bferguso/arches-workflow-stepper@main", | ||
| "arches-zod-validation @ git+https://github.com/bcgov/arches-zod-validation@expose_resource_alias_function", | ||
| "arches-zod-validation @ git+https://github.com/bcgov/arches-zod-validation@generate_http_method_names", |
| const urls: Record<string, unknown> = { | ||
| api_process_requirements: (id: string) => | ||
| `/bcap/api/process_requirement/${id}`, | ||
| api_resource: (graphSlug: string, id: string) => | ||
| `/bcap/api/resource/${graphSlug}/${id}`, | ||
| api_resource_blank: (graphSlug: string) => | ||
| `/bcap/api/resource/${graphSlug}/blank`, | ||
| api_site_related_resources: (graphSlug: string, id: string) => | ||
| `/bcap/api/arch_site_related_resources/${graphSlug}/${id}`, | ||
| api_workflow_draft: (graphSlug: string) => | ||
| `/bcap/api/workflow_draft/${graphSlug}`, | ||
| api_workflow_draft_all: '/bcap/api/workflow_draft', | ||
| assignable_contributors: '/bcap/api/contributors/assignable', | ||
| assignable_groups: '/bcap/api/assignable_groups', | ||
| bcap_message_detail: (messageId: string) => | ||
| `/bcap/api/bcap_message/${messageId}`, | ||
| bcap_message_resource_threads: (resourceId: string) => | ||
| `/bcap/api/bcap_message/resource/${resourceId}/threads`, | ||
| bcap_message_thread_messages: (threadId: string) => | ||
| `/bcap/api/bcap_message/thread/${threadId}`, | ||
| dashboard: '/bcap/api/dashboard', | ||
| dashboard_external: '/bcap/api/dashboard/external', | ||
| module_requirement: ( | ||
| permitId: string, | ||
| moduleTileId: string, | ||
| requirementId: string, | ||
| ) => | ||
| `/bcap/api/permit_application/${permitId}/module/${moduleTileId}/requirement/${requirementId}`, | ||
| permit_application_create: '/bcap/api/permit_application', | ||
| plugin: (slug: string) => `/plugins/${slug}`, | ||
| registration_link: '/bcap/api/registration_link', | ||
| seed_process_requirements: (permitId: string, permitType: string) => | ||
| `/bcap/api/permit_application/${permitId}/process_requirement/${permitType}`, | ||
| unlinked_contributors: '/bcap/api/unlinked_contributors', | ||
| }; |
There was a problem hiding this comment.
all these in here all at once saves alot of repetition
P-Hansen
left a comment
There was a problem hiding this comment.
another monster PR, lgtm
|
I'm wondering if more of the routes should have been removed by codegen, but that's something we can fix in the next PR |
* Interim commit * Interim commit * Add unit tests, delete all cnw rows * Align controlled list uris with https://localhost/bcap prefix Add migration to give Submitter group access to external dashboard * Fix Publication.json formatting * Fix skos file * Fix black format * Fix resource instance node search strings
* Add unit test for graph searchString validity. Fix Publication and Document Submission resouce models * Fix resource model format * lint * fix bcap message --------- Co-authored-by: Travis Semple <travis8814@gmail.com>
#1656
Internal dashboard takes you to the requirement clicked on
Add in company field for draft filing / permit application
Workflow Draft graph rework
Rewrite Workflow Draft Services to use arches-querysets
Remove add modules for staff (needs discussion)
Company project visibility (users can see all projects for their company)
Make external dashboard 2 tabs -> Filings and Drafts, and then add a checkbox that works for either that would expand the list to the ones the company owns
Small filing summary CSS tweaks
Unit test refactor a bit
Relies on:
bcgov/arches-zod-validation#5