forked from vikingeducation/project_djello
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprepwork
More file actions
128 lines (84 loc) · 2.17 KB
/
Copy pathprepwork
File metadata and controls
128 lines (84 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
TIPS:
- write tests for each piece of functionality
- keep seeds.rb updated
- refactor after each epic
=========================
STATES:
boards (acts as index?)
boards/show/:id
cards (acts as index?)
cards/show/:id
=========================
HOW TO CHANGE STATE WITH A DROPDOWN MENU:
// controller
.controller('CoursesTrackCtrl', function ($scope, $stateParams, $http, $log, $state) {
$scope.changeState = function (course) {
$state.go('courses.track.materials', { courseCode: course.CourseCode });
}
});
// html
<select style="padding:3px 1px; width:100%;" data-ng-model="course" data-ng-options="course.Title for course in courses" data-ng-change="changeState(course)">
<option value="">-- Select a Course --</option>
</select>
=========================
VIEWS:
- login screen is a separate page from the SPA
// layouts/application.html.erb
<%= render partial: 'header' %>
<%= yield %>
<%= render partial: 'footer' %>
// views/static_pages/home.html.erb
<ui-view></ui-view>
=========================
LISTS:
should do cards | orderBy '-priority'
can drag/drop to change priority of a card
=========================
CARD TEMPLATEs:
new
show (as a modal), same as edit
=========================
EDITING A CARD:
clicking on a field makes it edit-able, can only click on one field at a time, if you click away from the field the edits are ignored
=========================
ASSOCIATIONS:
card has_many :users
user has_many :cards (many to many, need join table)
card has_many :activities
activity belongs_to :card
board belongs_to :user
user has_many :boards
board has_many :lists
list belongs_to :board
user has_many :lists, through :boards
list belongs_to :user, through :boards
=========================
ACTIVITY FEED
- all activity on a Card is recorded as part of that card's "Activity feed"
- polymorphic relationship? every time you edit a field, add a member, etc. it gets added to 'activities' for that card
=========================
user: {
boards: {
...
lists: {
...
cards: {
...
}
}
}
}
user: {
boards: {
...
}
}
lists (by user_id) {
list1: {},
list2: {}
}
list: {
card1: {}
card2: {}
card3: {}
}