DontPlanToEnd commited on
Commit
dae77ed
·
verified ·
1 Parent(s): b6a0b1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +73 -21
app.py CHANGED
@@ -144,7 +144,51 @@ app.index_string = '''
144
  --secondary-text: #8b949e;
145
  --pinned-bg: #1c2128;
146
  --border-color: #30363d;
 
147
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
  body {
150
  font-family: 'Segoe UI', Arial, sans-serif;
@@ -670,25 +714,29 @@ for col in AXES_COLS_2:
670
  # Date Columns
671
  columnDefs.extend([
672
  {
673
- "field": "Release Date",
674
  "width": 130,
675
  "filter": "agDateColumnFilter",
676
- "valueFormatter": {
 
 
 
 
 
677
  "function": """
678
  function(params) {
679
- if (!params.value) return '';
680
- const [year, month, day] = params.value.split('-');
681
- return `${month}/${day}/${year}`;
682
  }
683
  """
684
  },
685
- "comparator": {
686
  "function": """
687
- function(valueA, valueB) {
688
- if (!valueA && !valueB) return 0;
689
- if (!valueA) return 1;
690
- if (!valueB) return -1;
691
- return valueA.localeCompare(valueB);
692
  }
693
  """
694
  },
@@ -702,22 +750,26 @@ columnDefs.extend([
702
  "field": "Test Date",
703
  "width": 130,
704
  "filter": "agDateColumnFilter",
705
- "valueFormatter": {
 
 
 
 
 
706
  "function": """
707
  function(params) {
708
- if (!params.value) return '';
709
- const [year, month, day] = params.value.split('-');
710
- return `${month}/${day}/${year}`;
711
  }
712
  """
713
  },
714
- "comparator": {
715
  "function": """
716
- function(valueA, valueB) {
717
- if (!valueA && !valueB) return 0;
718
- if (!valueA) return 1;
719
- if (!valueB) return -1;
720
- return valueA.localeCompare(valueB);
721
  }
722
  """
723
  },
 
144
  --secondary-text: #8b949e;
145
  --pinned-bg: #1c2128;
146
  --border-color: #30363d;
147
+ color-scheme: dark;
148
  }
149
+ .ag-theme-alpine .ag-menu {
150
+ background-color: #161b22 !important;
151
+ color: #e6e6e6 !important;
152
+ border-color: #30363d !important;
153
+ }
154
+ .ag-theme-alpine .ag-filter-condition {
155
+ background-color: #161b22 !important;
156
+ border-color: #30363d !important;
157
+ }
158
+ .ag-theme-alpine .ag-mini-filter input,
159
+ .ag-theme-alpine .ag-filter input {
160
+ background-color: #0d1117 !important;
161
+ color: #e6e6e6 !important;
162
+ border-color: #30363d !important;
163
+ }
164
+ .ag-theme-alpine .ag-select .ag-picker-field-wrapper {
165
+ background-color: #0d1117 !important;
166
+ color: #e6e6e6 !important;
167
+ border-color: #30363d !important;
168
+ }
169
+ .ag-theme-alpine .ag-picker-field-wrapper {
170
+ border-color: #30363d !important;
171
+ }
172
+ .ag-theme-alpine .ag-select-list {
173
+ background-color: #161b22 !important;
174
+ color: #e6e6e6 !important;
175
+ }
176
+ .ag-theme-alpine .ag-select-list-item:hover {
177
+ background-color: #1c2128 !important;
178
+ }
179
+ .ag-theme-alpine input[type="date"] {
180
+ color-scheme: dark;
181
+ background-color: #161b22;
182
+ color: #e6e6e6;
183
+ border-color: #30363d;
184
+ }
185
+
186
+ .ag-theme-alpine input[type="date"]::-webkit-calendar-picker-indicator {
187
+ background-color: #161b22;
188
+ cursor: pointer;
189
+ filter: invert(0.8);
190
+ }
191
+
192
  }
193
  body {
194
  font-family: 'Segoe UI', Arial, sans-serif;
 
714
  # Date Columns
715
  columnDefs.extend([
716
  {
717
+ "field": "Release Date",
718
  "width": 130,
719
  "filter": "agDateColumnFilter",
720
+ "filterParams": {
721
+ "defaultOption": "greaterThan",
722
+ "browserDatePicker": True,
723
+ "inRangeInclusive": True
724
+ },
725
+ "filterValueGetter": {
726
  "function": """
727
  function(params) {
728
+ if (!params.data['Release Date']) return null;
729
+ const [year, month, day] = params.data['Release Date'].split('-');
730
+ return new Date(year, month - 1, day);
731
  }
732
  """
733
  },
734
+ "valueFormatter": {
735
  "function": """
736
+ function(params) {
737
+ if (!params.value) return '';
738
+ const [year, month, day] = params.value.split('-');
739
+ return `${month}/${day}/${year}`;
 
740
  }
741
  """
742
  },
 
750
  "field": "Test Date",
751
  "width": 130,
752
  "filter": "agDateColumnFilter",
753
+ "filterParams": {
754
+ "defaultOption": "greaterThan",
755
+ "browserDatePicker": True,
756
+ "inRangeInclusive": True
757
+ },
758
+ "filterValueGetter": {
759
  "function": """
760
  function(params) {
761
+ if (!params.data['Test Date']) return null;
762
+ const [year, month, day] = params.data['Test Date'].split('-');
763
+ return new Date(year, month - 1, day);
764
  }
765
  """
766
  },
767
+ "valueFormatter": {
768
  "function": """
769
+ function(params) {
770
+ if (!params.value) return '';
771
+ const [year, month, day] = params.value.split('-');
772
+ return `${month}/${day}/${year}`;
 
773
  }
774
  """
775
  },