@saooti/octopus-sdk 37.0.44 → 37.0.46

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": "@saooti/octopus-sdk",
3
- "version": "37.0.44",
3
+ "version": "37.0.46",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -138,11 +138,11 @@ export default defineComponent({
138
138
 
139
139
  computed: {
140
140
  ...mapState(useFilterStore, ["filterOrgaId"]),
141
- startOfDay(): number {
142
- return dayjs(this.daySelected).utcOffset(0).startOf("date").valueOf();
141
+ startOfDay(): string {
142
+ return dayjs(this.daySelected).utcOffset(0).startOf("date").toISOString();
143
143
  },
144
- endOfDay(): number {
145
- return dayjs(this.daySelected).utcOffset(0).endOf("date").valueOf();
144
+ endOfDay(): string {
145
+ return dayjs(this.daySelected).utcOffset(0).endOf("date").toISOString();
146
146
  },
147
147
  },
148
148
 
@@ -19,6 +19,7 @@
19
19
  :enable-time-picker="!isTimePicker ? displayTimePicker : undefined"
20
20
  :aria-labels="ariaLabels"
21
21
  :max-time="maxTime"
22
+ :month-picker="monthPicker"
22
23
  @update:model-value="$emit('updateDate', $event)"
23
24
  >
24
25
  </VueDatePicker>
@@ -57,6 +58,7 @@ export default defineComponent({
57
58
  seconds?: number | string;
58
59
  },
59
60
  },
61
+ monthPicker:{ default: false, type: Boolean },
60
62
  },
61
63
 
62
64
  emits: ["updateDate", "update:date"],
@@ -73,13 +75,28 @@ export default defineComponent({
73
75
  };
74
76
  },
75
77
  modelVal() {
76
- return this.time ?? this.range ?? this.date;
78
+ if(this.time){
79
+ return this.time;
80
+ }
81
+ if(this.range){
82
+ return this.range;
83
+ }
84
+ if(this.date && this.monthPicker){
85
+ return {
86
+ month: this.date.getMonth(),
87
+ year: this.date.getFullYear()
88
+ };
89
+ }
90
+ return this.date;
77
91
  },
78
92
  formatLocale() {
79
93
  return this.$i18n.locale;
80
94
  },
81
95
  format() {
82
96
  let timeString = "";
97
+ if(this.monthPicker){
98
+ return "MM/yyyy";
99
+ }
83
100
  if (this.displayTimePicker || this.isTimePicker) {
84
101
  timeString = "HH:mm";
85
102
  if (this.displaySeconds) {