Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"development": {
"username": "NAME",
"password": "PASSWORD",
"database": "DBNAME",
"username": "akshajk",
"password": "akkad1$",
"database": "nb",
"host": "127.0.0.1",
"dialect": "postgres"
},
"test": {
"username": "NAME",
"password": "PASSWORD",
"database": "DBNAME",
"username": "akshajk",
"password": "akkad1$",
"database": "nb",
"host": "127.0.0.1",
"dialect": "postgres"
},
"production": {
"username": "NAME",
"password": "PASSWORD",
"database": "DBNAME",
"username": "akshajk",
"password": "akkad1$",
"database": "nb",
"host": "127.0.0.1",
"dialect": "postgres"
}
Expand Down
48 changes: 48 additions & 0 deletions migrations/20210103073831-class-settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use strict';

module.exports = {
up: async (queryInterface, Sequelize) => {
/**
* Add altering commands here.
*
* Example:
* await queryInterface.createTable('users', { id: Sequelize.INTEGER });
*/
return Promise.all([
queryInterface.addColumn(
'classes',
'description',
{
type: Sequelize.STRING,
defaultValue: ""
}
),
queryInterface.addColumn(
'classes',
'term',
{
type: Sequelize.STRING,
defaultValue: ""
}
),
queryInterface.addColumn(
'classes',
'contact_email',
{
type: Sequelize.STRING,
defaultValue: ""
}
)

]);
},

down: async (queryInterface, Sequelize) => {
/**
* Add reverting commands here.
*
* Example:
* await queryInterface.dropTable('users');
*/
}
};
7 changes: 2 additions & 5 deletions models/Classes/Classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const nb_class = (sequelize, DataTypes) => {
unique: true,
allowNull: false
},
/*

description: {
type: DataTypes.STRING,
defaultValue: ""
Expand All @@ -23,10 +23,7 @@ const nb_class = (sequelize, DataTypes) => {
type: DataTypes.STRING,
defaultValue: ""
},
institution: {
type: DataTypes.STRING,
defaultValue: ""
},*/


is_archived:{
type: DataTypes.BOOLEAN,
Expand Down
4 changes: 2 additions & 2 deletions models/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ module.exports = function(models){
if(newData) {
course.update({
class_name: newData.class_name,
/*description: newData.description,
description: newData.description,
term: newData.term,
contact_email: newData.contact_email,
institution: newData.institution*/

})
.then(() => {
console.log("Updated title to " + newData.class_name);
Expand Down
23 changes: 23 additions & 0 deletions src/components/course/CourseDashboard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<template>
<div class="dashboard">
<div class="course-info">
<div v-if="course.description.length > 0">
<h3> <b>Description:</b> {{course.description}} </h3>
</div>
<div v-if="course.term.length > 0">
<h3> <b>Term:</b> {{course.term}} </h3>
</div>
<div v-if="course.contact_email.length > 0">
<h3> <b>Contact Email:</b> {{course.contact_email}} </h3>
</div>
<div v-if="course.institution && course.institution.institution_name">
<h3> <b>Institution:</b> {{course.institution.institution_name}} </h3>
</div>
</div>
<div class="tabs">
<div
v-for="tab in tabs"
Expand Down Expand Up @@ -232,5 +246,14 @@ export default {
text-align: left;
}

.course-info h3 {
margin: 0;
padding: 5px 0;
font-size: 16px;
font-weight: normal;
}
.course-info {
column-count: 2;
}

</style>
9 changes: 3 additions & 6 deletions src/components/course/CourseSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<input id="course-settings-sections" type="text" v-model="sections">
</div>

<div v-if="false">

<div class="group">
<label for="course-settings-description"> Description: </label>
<input id="course-settings-description" type="text" v-model="newCourse.description">
Expand All @@ -20,15 +20,12 @@
<label for="course-settings-term"> Term: </label>
<input id="course-settings-term" type="text" v-model="newCourse.term" placeholder="Spring 2021">
</div>
<div class="group">
<label for="course-settings-institution"> Institution: </label>
<input id="course-settings-institution" type="text" v-model="newCourse.institution" placeholder="UC Davis">
</div>

<div class="group">
<label for="course-settings-contact"> Contact Email: </label>
<input id="course-settings-contact" type="text" v-model="newCourse.contact_email">
</div>
</div>




Expand Down