@necrolab/dashboard 0.4.55 → 0.4.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@necrolab/dashboard",
3
- "version": "0.4.55",
3
+ "version": "0.4.56",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && npx workbox-cli generateSW workbox-config.cjs && vite build",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@faker-js/faker": "^7.6.0",
17
17
  "@msgpack/msgpack": "^3.0.0-beta2",
18
- "@necrolab/tm-renderer": "^0.1.10",
18
+ "@necrolab/tm-renderer": "^0.1.11",
19
19
  "@vitejs/plugin-vue": "^5.2.1",
20
20
  "@vueuse/core": "^11.3.0",
21
21
  "autoprefixer": "^10.4.21",
@@ -8,14 +8,14 @@
8
8
 
9
9
  <div>
10
10
  <div class="my-3 grid grid-cols-12 gap-3">
11
- <!-- Profile tag -->
11
+ <!-- Account tag -->
12
12
  <div class="input-wrapper relative-positioned z-tooltip col-span-4">
13
13
  <label class="label-override mb-2">
14
- Profile Tag
14
+ Account Tag
15
15
  <TagIcon />
16
16
  </label>
17
17
  <Dropdown
18
- :class="`input-default dropdown w-full p-4 ${errors.includes('profileTag') ? 'error' : ''}`"
18
+ :class="`input-default dropdown w-full p-4`"
19
19
  :default="ui.profile.tags[0]"
20
20
  :options="ui.profile.tags"
21
21
  :onClick="(f) => (account.tag = f)"
@@ -216,15 +216,16 @@ import {
216
216
  import { useUIStore } from "@/stores/ui";
217
217
  import Dropdown from "@/components/ui/controls/atomic/Dropdown.vue";
218
218
  import MultiDropdown from "@/components/ui/controls/atomic/MultiDropdown.vue";
219
- import { parseAxsEventUrl, removeDuplicates } from "@/stores/utils";
219
+ import { firstUpper, parseAxsEventUrl, removeDuplicates } from "@/stores/utils";
220
220
 
221
221
  const ui = useUIStore();
222
222
 
223
223
  const accountTagOptions = ref(ui.profile.tags);
224
224
  const defaultTags = ["Amex", "Visa", "Master"];
225
225
 
226
- const profileTagsOptions = ref(removeDuplicates(["Any", ...defaultTags, ...ui.profile.profileTags]));
227
-
226
+ const profileTagsOptions = ref(
227
+ removeDuplicates(["Any", ...defaultTags, ...ui.profile.profileTags.map((x) => firstUpper(x))])
228
+ );
228
229
  const baseTask = ref({
229
230
  selected: false,
230
231
  taskId: "",
@@ -338,14 +338,16 @@ import { useUIStore } from "@/stores/ui";
338
338
  import { countries } from "@/stores/countries";
339
339
  import Dropdown from "@/components/ui/controls/atomic/Dropdown.vue";
340
340
  import MultiDropdown from "@/components/ui/controls/atomic/MultiDropdown.vue";
341
- import { isEU, parseTmEventUrl, removeDuplicates } from "@/stores/utils";
341
+ import { isEU, firstUpper, parseTmEventUrl, removeDuplicates } from "@/stores/utils";
342
342
 
343
343
  const ui = useUIStore();
344
344
 
345
345
  const accountTagOptions = ref(ui.profile.tags);
346
346
  const defaultTags = ["Amex", "Visa", "Master"];
347
347
 
348
- const profileTagsOptions = ref(removeDuplicates(["Any", ...defaultTags, ...ui.profile.profileTags]));
348
+ const profileTagsOptions = ref(
349
+ removeDuplicates(["Any", ...defaultTags, ...ui.profile.profileTags.map((x) => firstUpper(x))])
350
+ );
349
351
 
350
352
  const baseTask = ref({
351
353
  selected: false,
@@ -531,6 +531,8 @@ function sortTaskIds(a, b) {
531
531
  return aInfo.num - bInfo.num;
532
532
  }
533
533
 
534
+ const firstUpper = (str) => `${str[0].toUpperCase()}${str.slice(1).toLowerCase()}`;
535
+
534
536
  function betterSort(a, b) {
535
537
  if (a === undefined || a === null) return b === undefined || b === null ? 0 : -1;
536
538
  if (b === undefined || b === null) return 1;
@@ -573,5 +575,6 @@ export {
573
575
  getCardType,
574
576
  validateCard,
575
577
  sortTaskIds,
578
+ firstUpper,
576
579
  betterSort
577
580
  };