Skip to content

CGSP 727 scvcep in gpm#114

Open
bpow wants to merge 18 commits into
mainfrom
CGSP-727-scvcep-in-gpm
Open

CGSP 727 scvcep in gpm#114
bpow wants to merge 18 commits into
mainfrom
CGSP-727-scvcep-in-gpm

Conversation

@bpow

@bpow bpow commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

making pull request for question/commenting purposes

label="CIViC webpage hyperlink"
:vertical="true"
:required="true"
:max-length="10"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not going to be anywhere near long enough! Is this size-limited on the backend-side? If so, we should use that here, or like with the vcep case, just not limit.

Better yet, since we use the same model variable, can we just have one input-row and make an expression for the label?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I addressed this with an additional commit by just making the label an expression.

return Storage::disk('local')->download($path, $doc->filename);
}

public function downloadGroupFinalSpecification(Group $group, Document $document)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method seems possibly unnecessary but also incomplete.

What is it intended to do that couldn't already be done with the existing show method? Is it just supposed to be a lookup against a specific document type for a group? If so, then the potential incompleteness about the method includes: i) There is no auth checking (like with the show method, but maybe on purpose since specs would be public), and ii) there's a $group argument that's never used. Seems like we'd at least want to validate that the group and document correspond to each other. It would make even more sense for the $group to be the only argument, and for the system to lookup the appropriate document based on the group.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, there are something have to be cleaned there.

  • I have removed 1 out of 2 routes I set for this and update the plural to singular naming for specification
  • $group was always part of the plan. I must have forgotten to include it as part of the validation
  • $group can be the only argument we need, but then again I've learned that final spec docs can be more than one, one of the reason I want to keep the doc UUID

@setiadha-unc setiadha-unc Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I forgot to add is that, downloadGroupFinalSpecification initially created to be publicly accessible so when the url is displayed on the website, it's downloadable. But let me know if it's the right direction to what we intended to do here. I'm open for suggestion.

@@ -0,0 +1,34 @@
<?php

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be done through the config/seeder approach (it looks like there's also something in config/next_actions.php that is relevant) rather than as a db migration.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me remove this, I must have added this before our last talk about db seeder using config

if (this.applicationIsDirty() ) {
return this.$store.dispatch('groups/saveApplicationData', this.group)
.then(() => {
this.$emit('saved');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"saved" event ends up getting emitted twice when save is called. The save() function calls saveUpdates(), which emits saved here, but then after completion of all promises in save(), emits saved again (line 83). I don't think we need the emit here on line 101, unless we can have a situation where saveUpdates is called outside of save.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove this, as well as the one on VCEP and GCEP application file

@bpow bpow force-pushed the CGSP-727-scvcep-in-gpm branch from af646f8 to 37eacfb Compare June 16, 2026 17:11
Comment thread routes/web.php Outdated
->where('any', '^(?!(api|sanctum|impersonate|dev|documents|downloads|clockwork|profile-photos|storage)).*$');

Route::get('/documents/{uuid?}', [DocumentController::class, 'show'])->middleware('auth:sanctum');
Route::get('/downloads/groups/{group:uuid}/final-specifications', [DocumentController::class, 'downloadGroupFinalSpecifications'])->name('groups.final-specifications.download');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's at least one thing wrong here, maybe more... these two routes have the same name, so I think laravel will only register one. Furthermore, line 39 refers to downloadGroupFinalSpecifications (plural), whereas only the singular is defined (As in line 40). But also see my comment elsewhere for whether or not we need that as a separate endpoint, and if so what its functionality should be.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to the previous comment about the final spec doc, I keep the 2nd route and remove the 1st one.

@bpow bpow force-pushed the CGSP-727-scvcep-in-gpm branch from 81ae263 to 6530e26 Compare June 16, 2026 19:48
bpow and others added 3 commits June 16, 2026 15:50
- removed migration file, coverd by config
- removed emit(saved) on all group types application file.
CGSP-727
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 this pull request may close these issues.

2 participants