Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoWeb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
UI
DojoWeb
Commits
b85186c7
Commit
b85186c7
authored
1 year ago
by
kelly.nguyen
Browse files
Options
Downloads
Patches
Plain Diff
format date in display for assignments
parent
0bddd491
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AngularApp/src/app/table-list/table-list.component.html
+3
-3
3 additions, 3 deletions
AngularApp/src/app/table-list/table-list.component.html
AngularApp/src/app/table-list/table-list.component.ts
+9
-11
9 additions, 11 deletions
AngularApp/src/app/table-list/table-list.component.ts
with
12 additions
and
14 deletions
AngularApp/src/app/table-list/table-list.component.html
+
3
−
3
View file @
b85186c7
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
<tr
*ngFor=
"let assignment of assignments"
>
<tr
*ngFor=
"let assignment of assignments"
>
<td>
{{assignment.gitlabId}}
</td>
<td>
{{assignment.gitlabId}}
</td>
<td>
{{assignment.name}}
</td>
<td>
{{assignment.name}}
</td>
<td>
{{
c
reationInfo.description}}
</td>
<td>
{{
assignment.gitlabC
reationInfo.description}}
</td>
<td>
{{
c
reationInfo.created_at}}
</td>
<td>
{{
assignment.gitlabC
reationInfo.created_at
| date:"dd MMM yyyy 'at' hh:mm"
}}
</td>
<td>
{{
lastInfo.updated_at
}}
</td>
<td>
{{
assignment.gitlabLastInfo.updated_at | date:"dd MMM yyyy 'at' hh:mm"
}}
</td>
<td>
{{assignment.gitlabLink}}
</td>
<td>
{{assignment.gitlabLink}}
</td>
<td>
<td>
<button
class=
"btn btn-outline-danger"
>
Delete
</button>
<button
class=
"btn btn-outline-danger"
>
Delete
</button>
...
...
This diff is collapsed.
Click to expand it.
AngularApp/src/app/table-list/table-list.component.ts
+
9
−
11
View file @
b85186c7
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Assignment
}
from
'
app/model/assignment
'
;
import
{
Assignment
}
from
'
app/model/assignment
'
;
import
{
Enonce
}
from
'
app/model/enonce
'
;
import
{
AssignmentService
}
from
'
services/assignment.service
'
;
import
{
AssignmentService
}
from
'
services/assignment.service
'
;
import
{
DatePipe
}
from
'
@angular/common
'
;
@
Component
({
@
Component
({
selector
:
'
app-table-list
'
,
selector
:
'
app-table-list
'
,
...
@@ -11,27 +12,24 @@ import { AssignmentService } from 'services/assignment.service';
...
@@ -11,27 +12,24 @@ import { AssignmentService } from 'services/assignment.service';
export
class
TableListComponent
implements
OnInit
{
export
class
TableListComponent
implements
OnInit
{
assignments
:
Assignment
[]
=
[]
assignments
:
Assignment
[]
=
[]
data
:
[]
=
[]
data
:
[]
=
[]
creationInfo
:
JSON
formattedDate
:
string
lastInfo
:
JSON
headers
:
string
[]
=
[
'
Gitlab ID
'
,
'
Name
'
,
'
Description
'
,
'
Creation date
'
,
'
Last Update
'
,
'
gitlabLink
'
,
'
Options
'
];
constructor
(
private
service
:
AssignmentService
)
{
}
headers
:
string
[]
=
[
'
Gitlab ID
'
,
'
Name
'
,
'
Description
'
,
'
gitlabCreationInfo
'
,
'
Last Update
'
,
'
gitlabLink
'
,
'
Options
'
];
constructor
(
private
service
:
AssignmentService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
service
.
getAssignments
().
subscribe
((
assignment
)
=>
{
this
.
service
.
getAssignments
().
subscribe
((
assignment
)
=>
{
this
.
assignments
=
assignment
this
.
assignments
=
assignment
for
(
let
i
=
0
;
i
<
this
.
assignments
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
assignments
.
length
;
i
++
)
{
this
.
creationInfo
=
JSON
.
parse
(
this
.
assignments
[
i
].
gitlabCreationInfo
)
this
.
assignments
[
i
].
gitlabCreationInfo
=
JSON
.
parse
(
assignment
[
i
].
gitlabCreationInfo
)
this
.
lastInfo
=
JSON
.
parse
(
this
.
assignments
[
i
].
gitlabLastInfo
)
this
.
assignments
[
i
].
gitlabLastInfo
=
JSON
.
parse
(
assignment
[
i
].
gitlabLastInfo
)
console
.
log
(
this
.
creationInfo
)
console
.
log
(
this
.
lastInfo
)
}
}
})
})
}
}
delAssignment
()
{
delAssignment
()
{
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment