@factoringplus/pl-components-pack-v3 0.4.96-pre-3 → 0.4.96-pre-5

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.
@@ -44320,13 +44320,44 @@ var apiChat = {
44320
44320
  });
44321
44321
  }
44322
44322
  };
44323
+ const useGroupsStore = defineStore("groups", {
44324
+ state: () => ({
44325
+ groups: [],
44326
+ groupInfo: ""
44327
+ }),
44328
+ getters: {
44329
+ api() {
44330
+ const configStore = useConfigStore();
44331
+ return configStore.api;
44332
+ },
44333
+ baseUrl() {
44334
+ const configStore = useConfigStore();
44335
+ return configStore.baseUrl;
44336
+ },
44337
+ isNewLine(state) {
44338
+ return state.groupInfo.name.length > 3;
44339
+ }
44340
+ },
44341
+ actions: {
44342
+ setGroupInfo(value) {
44343
+ this.groupInfo = value;
44344
+ },
44345
+ async getGroups() {
44346
+ try {
44347
+ this.groups = await apiChat.getGroups(this.api, this.baseUrl);
44348
+ } catch (error2) {
44349
+ console.log(error2);
44350
+ }
44351
+ }
44352
+ }
44353
+ });
44323
44354
  const useChannelsStore = defineStore("channels", {
44324
44355
  state: () => ({
44325
44356
  channels: [],
44326
44357
  unreadChannels: {},
44327
44358
  channelCategory: "Active",
44328
44359
  isLoadingChannels: false,
44329
- isChannelsList: false,
44360
+ isChannelsList: true,
44330
44361
  isOpenChannel: false,
44331
44362
  isFilesList: false,
44332
44363
  isClientInfo: false,
@@ -44725,37 +44756,6 @@ const _sfc_main$2 = {
44725
44756
  }
44726
44757
  };
44727
44758
  dayjs.locale("ru");
44728
- const useGroupsStore = defineStore("groups", {
44729
- state: () => ({
44730
- groups: [],
44731
- groupInfo: ""
44732
- }),
44733
- getters: {
44734
- api() {
44735
- const configStore = useConfigStore();
44736
- return configStore.api;
44737
- },
44738
- baseUrl() {
44739
- const configStore = useConfigStore();
44740
- return configStore.baseUrl;
44741
- },
44742
- isNewLine(state) {
44743
- return state.groupInfo.name.length > 3;
44744
- }
44745
- },
44746
- actions: {
44747
- setGroupInfo(value) {
44748
- this.groupInfo = value;
44749
- },
44750
- async getGroups() {
44751
- try {
44752
- this.groups = await apiChat.getGroups(this.api, this.baseUrl);
44753
- } catch (error2) {
44754
- console.log(error2);
44755
- }
44756
- }
44757
- }
44758
- });
44759
44759
  const useSelectedChannelStore = defineStore("selectedChannel", {
44760
44760
  state: () => ({
44761
44761
  channelId: "",
@@ -45206,6 +45206,7 @@ const _sfc_main = {
45206
45206
  const props = __props;
45207
45207
  const { token, baseUrl } = toRefs(props);
45208
45208
  const configStore = useConfigStore();
45209
+ const groupsStore = useGroupsStore();
45209
45210
  const channelsStore = useChannelsStore();
45210
45211
  const isHubsConnected = ref(true);
45211
45212
  const isOpen = ref(false);
@@ -45218,7 +45219,7 @@ const _sfc_main = {
45218
45219
  await Promise.all([
45219
45220
  await channelsStore.getChannels(),
45220
45221
  await channelsStore.getUnreadChannels(),
45221
- await channelsStore.getGroups()
45222
+ await groupsStore.getGroups()
45222
45223
  ]);
45223
45224
  };
45224
45225
  const updateChannels = async () => {