Skip to content

Commit 26038ac

Browse files
enriquezreneDiegoTinitana
authored andcommitted
fix: #172 removing old styles
1 parent b3c016d commit 26038ac

File tree

5 files changed

+57
-81
lines changed

5 files changed

+57
-81
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/modules/shared/components/details-fields/details-fields.component.scss

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,6 @@
1919
display: none;
2020
}
2121

22-
.save-button-style {
23-
background-color: $modal-button-primary;
24-
color: white;
25-
}
26-
27-
.close-button-style {
28-
background-color: $modal-button-secondary;
29-
color: white;
30-
}
31-
3222
.technology-content {
3323
box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
3424
margin: 0 0 2rem 6rem;

src/app/modules/shared/components/details-fields/details-fields.component.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,16 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
6262
start_hour: '00:00',
6363
end_hour: '00:00',
6464
uri: '',
65+
technology: '',
6566
});
6667
}
6768

6869
ngOnInit(): void {
6970
const technologies$ = this.store.pipe(select(allTechnologies));
7071
technologies$.subscribe((response) => {
7172
this.isLoading = response.isLoading;
72-
this.technology = response.technologyList;
73+
const filteredItems = response.technologyList.items.filter(item => !this.selectedTechnology.includes(item.name));
74+
this.technology = { items: filteredItems };
7375
});
7476

7577
this.store.dispatch(new projectActions.LoadProjects());
@@ -106,6 +108,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
106108
end_date: this.entryToEdit.end_date ? formatDate(this.entryToEdit.end_date, 'yyyy-MM-dd', 'en') : '',
107109
end_hour: this.entryToEdit.end_date ? formatDate(this.entryToEdit.end_date, 'HH:mm', 'en') : '00:00',
108110
uri: this.entryToEdit.uri,
111+
technology: '',
109112
});
110113
} else {
111114
this.selectedTechnology = [];
@@ -124,6 +127,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
124127
end_date: formatDate(new Date(), 'yyyy-MM-dd', 'en'),
125128
end_hour: '00:00',
126129
uri: '',
130+
technology: '',
127131
});
128132
}
129133
}
@@ -136,16 +140,16 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
136140
}
137141

138142
setTechnology(name: string) {
139-
const index = this.selectedTechnology.indexOf(name);
140-
if (index > -1) {
141-
this.removeTag(index);
142-
} else if (this.selectedTechnology.length < 10) {
143-
this.selectedTechnology = [...this.selectedTechnology, name];
144-
}
143+
this.selectedTechnology = [...this.selectedTechnology, name];
144+
this.showlist = false;
145+
this.entryForm.get('technology').reset();
145146
}
146147

147148
removeTag(index) {
148149
this.selectedTechnology.splice(index, 1);
150+
this.selectedTechnology = [...this.selectedTechnology, name];
151+
this.showlist = false;
152+
this.entryForm.get('technology').reset();
149153
}
150154

151155
onSubmit() {

src/app/modules/time-entries/pages/time-entries.component.html

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
data-target="#editRecordsByDate"
99
class="btn btn-primary"
1010
>
11-
<i class="fa fa-plus-square"></i> New Entry
11+
Add new entry
1212
</button>
1313
</div>
1414
</div>
15+
<<<<<<< HEAD
1516
<div class="card">
1617
<app-month-picker (monthSelected)="getMonth($event)"></app-month-picker>
1718
<div class="row m-0 header-entries">
@@ -67,20 +68,47 @@
6768
<button
6869
class="btn btn-sm btn-small"
6970
data-toggle="modal"
71+
=======
72+
<div style="height: 10px;"></div>
73+
<app-month-picker (monthSelected)="getMonth($event)"></app-month-picker>
74+
75+
<div style="height: 10px;"></div>
76+
77+
<table class="table table-sm table-striped">
78+
<thead class="thead-orange">
79+
<tr class="d-flex">
80+
<th class="col-5">Project</th>
81+
<th class="col-5">Duration</th>
82+
<th class="col-2"></th>
83+
</tr>
84+
</thead>
85+
<tbody>
86+
<tr
87+
class="d-flex"
88+
*ngFor="let item of dataByMonth"
89+
>
90+
<td class="col-sm-5">{{ item.project_id }}</td>
91+
<td class="col-sm-5">{{ item.time }}</td>
92+
<td class="col-sm-2 text-center">
93+
<button type="button" class="btn btn-sm btn-secondary"
94+
data-toggle="modal"
95+
data-target="#editRecordsByDate"
96+
(click)="editEntry(item.id)">
97+
<i class="fa fa-pencil fa-xs"></i>
98+
</button>
99+
<button type="button" class="btn btn-sm btn-danger ml-2"
100+
data-toggle="modal"
101+
>>>>>>> fix: #172 removing old styles
70102
data-target="#deleteModal"
71-
(click)="openModal(item)"
72-
>
73-
<i class="fa fa-trash"></i>
74-
</button>
75-
</div>
76-
</div>
77-
</div>
78-
</div>
79-
</div>
80-
<ng-template #emptyState>
81-
<app-empty-state></app-empty-state>
82-
</ng-template>
83-
</div>
103+
(click)="openModal(item)">
104+
<i class="fas fa-trash-alt fa-xs"></i>
105+
</button>
106+
</td>
107+
</tr>
108+
</tbody>
109+
</table>
110+
111+
84112
</div>
85113
<div class="modal fade" id="editRecordsByDate" tabindex="-1" role="dialog" aria-hidden="true">
86114
<div class="modal-dialog modal-dialog-centered" role="document">
Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,2 @@
11
@import '../../../../styles/colors.scss';
22

3-
.container-time-entries {
4-
padding: 1rem;
5-
}
6-
7-
.header-entries {
8-
background-color: rgba(0, 0, 0, 0.03);
9-
border-top: 1px solid rgba(0, 0, 0, 0.125);
10-
}
11-
12-
.accordion-container {
13-
max-height: 25rem;
14-
overflow-y: auto;
15-
16-
&::-webkit-scrollbar {
17-
display: none;
18-
}
19-
}
20-
21-
.date-header {
22-
background-image: $background-gradient-items;
23-
border-radius: 0;
24-
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
25-
font-size: small;
26-
padding: 0 0.9rem;
27-
28-
a {
29-
color: #000000;
30-
}
31-
}
32-
33-
.btn-small > i {
34-
font-size: 0.8rem;
35-
opacity: 0.7;
36-
}
37-
38-
.entries {
39-
align-items: center;
40-
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
41-
display: flex;
42-
font-size: small;
43-
44-
&:hover {
45-
background-color: #d5edf0;
46-
cursor: pointer;
47-
}
48-
}

0 commit comments

Comments
 (0)