Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cbdiscord
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Geovanny E. Vera Pazmino
cbdiscord
Commits
91bef4dd
Commit
91bef4dd
authored
May 26, 2020
by
Geovanny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added wardate to participation table
parent
7e48d4e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
controller.js
web/myhouse/controller.js
+1
-1
index.html
web/myhouse/index.html
+1
-1
participation_view.js
web/myhouse/participation_view.js
+10
-0
view.js
web/myhouse/view.js
+2
-2
No files found.
web/myhouse/controller.js
View file @
91bef4dd
...
@@ -177,7 +177,7 @@ class MyHouseController{
...
@@ -177,7 +177,7 @@ class MyHouseController{
async
getParticipation
(){
async
getParticipation
(){
try
{
try
{
const
data
=
await
this
.
sync
.
getParticipation
();
const
data
=
await
this
.
sync
.
getParticipation
();
this
.
view
.
drawParticipationTable
(
data
);
this
.
view
.
updateParticipationView
(
data
);
}
catch
(
error
){
}
catch
(
error
){
console
.
log
(
error
);
console
.
log
(
error
);
}
}
...
...
web/myhouse/index.html
View file @
91bef4dd
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<war-participation>
<war-participation>
<table-wrapper>
<table-wrapper>
<div
class=
"table_header"
>
<div
class=
"table_header"
>
<p
class=
"header_title"
>
Participation:
</p>
<p
id=
"war_date"
class=
"header_title"
>
Participation:
</p>
<button
id=
"yes"
class=
"one"
>
Yes
</button>
<button
id=
"yes"
class=
"one"
>
Yes
</button>
<button
id=
"no"
class=
"two"
>
No
</button>
<button
id=
"no"
class=
"two"
>
No
</button>
<button
id=
"maybe"
class=
"three"
>
Maybe
</button>
<button
id=
"maybe"
class=
"three"
>
Maybe
</button>
...
...
web/myhouse/participation_view.js
View file @
91bef4dd
...
@@ -11,6 +11,7 @@ class ParticipationView extends EventTarget{
...
@@ -11,6 +11,7 @@ class ParticipationView extends EventTarget{
super
();
super
();
this
.
element
=
element
;
this
.
element
=
element
;
this
.
war_date
=
element
.
querySelector
(
"#war_date"
)
this
.
yes_button
=
element
.
querySelector
(
"#yes"
);
this
.
yes_button
=
element
.
querySelector
(
"#yes"
);
this
.
maybe_button
=
element
.
querySelector
(
"#maybe"
);
this
.
maybe_button
=
element
.
querySelector
(
"#maybe"
);
this
.
no_button
=
element
.
querySelector
(
"#no"
);
this
.
no_button
=
element
.
querySelector
(
"#no"
);
...
@@ -27,6 +28,15 @@ class ParticipationView extends EventTarget{
...
@@ -27,6 +28,15 @@ class ParticipationView extends EventTarget{
});
});
}
}
updateParticipation
(
data
){
this
.
updateWarDate
(
data
.
war
);
this
.
drawTable
(
data
.
participation
);
}
updateWarDate
(
war
){
const
day_str
=
new
Date
(
war
.
day
).
toLocaleDateString
();
this
.
war_date
.
innerText
=
'WarDate: '
+
day_str
;
}
drawTable
(
data
){
drawTable
(
data
){
this
.
table_view
.
drawTable
(
data
);
this
.
table_view
.
drawTable
(
data
);
}
}
...
...
web/myhouse/view.js
View file @
91bef4dd
...
@@ -50,8 +50,8 @@ class MyHouseController extends EventTarget{
...
@@ -50,8 +50,8 @@ class MyHouseController extends EventTarget{
this
.
hideArea2
();
this
.
hideArea2
();
}
}
drawParticipationTable
(
data
){
updateParticipationView
(
data
){
this
.
participation_view
.
drawTable
(
data
);
this
.
participation_view
.
updateParticipation
(
data
);
}
}
drawMemberUnitsTable
(
data
){
drawMemberUnitsTable
(
data
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment