-
Notifications
You must be signed in to change notification settings - Fork 13
#5420 - Update Offering View #5563
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
Changes from all commits
e191003
5cbea57
60c752a
f82bcf0
b775cad
25380e8
6506557
deba09f
3061083
ed3f9c5
561f7ce
f52a421
69acae2
8ec217b
ed6c081
d532605
ad3e6f9
e4db2d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,26 +2,26 @@ | |
| <v-card> | ||
| <v-container :fluid="true"> | ||
dheepak-aot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <program-details | ||
| :programId="programId" | ||
| :locationId="locationId" | ||
| :educationProgram="educationProgram" | ||
| :program-id="programId" | ||
| :location-id="locationId" | ||
| :education-program="educationProgram" | ||
weskubo-cgi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| :allow-edit="allowEdit && isProgramEditable" | ||
| :allow-deactivate="allowDeactivate && isProgramEditable" | ||
| @program-data-updated="$emit('programDataUpdated')" | ||
| /> | ||
| <hr class="horizontal-divider" /> | ||
| <offering-summary | ||
| :programId="programId" | ||
| :locationId="locationId" | ||
| :isEditAllowed=" | ||
| educationProgram.isActive && !educationProgram.isExpired | ||
| " | ||
| :institutionId="institutionId" | ||
| :program-id="programId" | ||
| :location-id="locationId" | ||
| :allow-edit="allowEdit && isProgramEditable" | ||
| :institution-id="institutionId" | ||
| /> | ||
| </v-container> | ||
| </v-card> | ||
| </template> | ||
|
|
||
| <script lang="ts"> | ||
| import { defineComponent } from "vue"; | ||
| import { computed, defineComponent, PropType } from "vue"; | ||
| import ProgramDetails from "@/components/common/ProgramDetails.vue"; | ||
| import OfferingSummary from "@/components/common/OfferingSummary.vue"; | ||
| import { EducationProgramAPIOutDTO } from "@/services/http/dto"; | ||
|
|
@@ -41,14 +41,34 @@ export default defineComponent({ | |
| required: true, | ||
| }, | ||
| educationProgram: { | ||
| type: Object, | ||
| type: Object as PropType<EducationProgramAPIOutDTO>, | ||
| required: true, | ||
| default: {} as EducationProgramAPIOutDTO, | ||
| }, | ||
| institutionId: { | ||
| type: Number, | ||
| required: false, | ||
| default: undefined, | ||
| }, | ||
| allowEdit: { | ||
| type: Boolean, | ||
| required: false, | ||
| default: true, | ||
| }, | ||
| allowDeactivate: { | ||
| type: Boolean, | ||
| required: false, | ||
| default: true, | ||
| }, | ||
| }, | ||
| setup(props) { | ||
| const isProgramEditable = computed( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: This doesn't need to be computed as it's not used in the template.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it actually caused a bug after I removed the computed, I don't know much about why but I ended up adding it back |
||
| () => | ||
| props.educationProgram.isActive && !props.educationProgram.isExpired, | ||
| ); | ||
| return { | ||
| isProgramEditable, | ||
| }; | ||
| }, | ||
| }); | ||
| </script> | ||
Uh oh!
There was an error while loading. Please reload this page.