feat: Enhance Gantt chart functionality with task filtering and styling improvements
This commit is contained in:
@@ -229,11 +229,11 @@
|
||||
}
|
||||
|
||||
.gantt .bar.gantt-task-faktura {
|
||||
fill: #a1277d;
|
||||
fill: #a900fc;
|
||||
}
|
||||
|
||||
.gantt .bar-wrapper:hover .bar.gantt-task-faktura {
|
||||
fill: #a1277d;
|
||||
fill: #a900fc;
|
||||
}
|
||||
|
||||
.gantt .bar-progress {
|
||||
@@ -353,4 +353,58 @@
|
||||
.upper-date-separator {
|
||||
stroke: #ccc;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
/* Styl dla podświetlenia tekstu dzisiejszej daty w nagłówku */
|
||||
.gantt .date text.today-date-highlight {
|
||||
fill: #E91E63;
|
||||
/* Wybierz kolor podświetlenia, np. różowy */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Opcjonalnie: Styl dla podświetlenia całej kolumny dzisiejszej daty */
|
||||
/* Ta reguła już prawdopodobnie istnieje w Twoim kodzie (make_grid_highlights) */
|
||||
.gantt .grid .today-highlight {
|
||||
fill: #fcf8e3;
|
||||
/* Jasnożółte tło dla całej kolumny */
|
||||
opacity: 0.7;
|
||||
/* Lekka przezroczystość */
|
||||
}
|
||||
|
||||
/* Poprawka dla czytelności tekstu na podświetlonym tle */
|
||||
.gantt .grid .today-highlight+.date text.today-date-highlight {
|
||||
/* Można dodać dodatkowe style, jeśli tekst zlewa się z tłem kolumny */
|
||||
}
|
||||
|
||||
/* Upewnij się, że górny i dolny tekst daty są dobrze widoczne */
|
||||
.gantt .date .upper-text {
|
||||
fill: #555;
|
||||
font-size: 12px;
|
||||
/* text-anchor: middle; */
|
||||
/* Usunięte stąd, ustawiane dynamicznie w JS */
|
||||
}
|
||||
|
||||
.gantt .date .lower-text {
|
||||
fill: #333;
|
||||
font-size: 12px;
|
||||
/* text-anchor: middle; */
|
||||
/* Usunięte stąd, ustawiane dynamicznie w JS */
|
||||
}
|
||||
|
||||
/* Styl dla linii oddzielających daty w nagłówku */
|
||||
.gantt .date .date-separator {
|
||||
stroke: #e0e0e0;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
/* Opcjonalnie: Podświetlenie linii separatora dla dzisiejszej daty */
|
||||
.gantt .date .date-separator.today-date-highlight {
|
||||
stroke: #E91E63;
|
||||
/* Ten sam kolor co tekst */
|
||||
}
|
||||
|
||||
.upper-text.today-date {
|
||||
fill: red !important;
|
||||
font-weight: bold;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
@@ -1751,9 +1751,9 @@ class Gantt {
|
||||
}
|
||||
|
||||
refresh(tasks) {
|
||||
this.setup_tasks(tasks);
|
||||
this.synchronizing_date(tasks);
|
||||
this.change_view_mode();
|
||||
this.setup_tasks(tasks);
|
||||
this.synchronizing_date(tasks);
|
||||
this.change_view_mode();
|
||||
}
|
||||
|
||||
change_view_mode(mode = this.options.view_mode) {
|
||||
@@ -2206,13 +2206,22 @@ class Gantt {
|
||||
|
||||
// Rysujemy górny tekst
|
||||
if (date.upper_text) {
|
||||
const $upper_text = createSVG('text', {
|
||||
x: date.upper_x + this.options.column_width,
|
||||
y: date.upper_y,
|
||||
innerHTML: date.upper_text,
|
||||
class: 'upper-text',
|
||||
append_to: this.layers.date
|
||||
});
|
||||
const original_date = this.dates[i];
|
||||
const today = date_utils.today();
|
||||
|
||||
const isToday =
|
||||
original_date.getDate() === today.getDate() &&
|
||||
original_date.getMonth() === today.getMonth() &&
|
||||
original_date.getFullYear() === today.getFullYear();
|
||||
console.log(date.upper_text + ' | ' + isToday );
|
||||
|
||||
const $upper_text = createSVG('text', {
|
||||
x: date.upper_x + this.options.column_width,
|
||||
y: date.upper_y,
|
||||
innerHTML: date.upper_text,
|
||||
class: 'upper-text' + (isToday ? ' today-date' : ''),
|
||||
append_to: this.layers.date
|
||||
});
|
||||
|
||||
// Ramka na końcu kolumny
|
||||
createSVG('line', {
|
||||
|
||||
Reference in New Issue
Block a user