login, loginByExchangeToken, getPreLoginPasswordInfo, getUserData, and
changeExpiredPassword (src/api/user.js) assumed error bodies were JSON
with a `.message` field, so a non-JSON body (e.g. nginx's HTML page
for a 502/503/504) produced a blank message or a hardcoded
"Unexpected error" instead of the real status/reason. Same happens
with the requests behing the Dashboard page.
Fix:
* Add getHttpErrorMessage (src/helpers/http-error.js) to build
"<status> <statusText>" from the response, falling back to a small
reason-phrase table for common 5xx statuses and finally to the
caller's message only when there's no response at all. Existing
JSON-message behavior (Invalid OTP, Password expired, Banned,
validation errors) is unchanged.
* Change getList (common.js) to route errors through handleResponseError
and update CscPageDashboard.vue to read reason?.message so a
502/503/504 on the dashboard's call/voicemail/device cards shows the
real status instead of a generic error.
Moreover, getOTPSecret/getOTPSecretAsText (src/store/user.js) had
the same generic-message problem, worsened by needing the raw response
(handleResponseError strips it) to tell "no OTP yet" apart from a real
failure.
Fix:
* Rework to fetch that response directly and reuse the new helper;
* Rename parseBlobToObject to parseErrorPayload/resolveBlobPayload
(src/helpers/parse-error-payload.js) accordingly
* fix OTP state reset timing so a blank/wrong-code retry shows
"Invalid OTP Code" instead of looping back into QR discovery.
Note, some requests still return the standard axios error message and
will be investigated separately.
Update relevant docs.
Co-Authored-by: Debora Crescenzo <dcrescenzo@sipwise.com>
Change-Id: Ia5a167ffdabb70fc2f604937f9472138b51172fc
Prevent subscribers from modifying or deleting call forwarding
resources they do not own:
* Use the API-provided own property to show edit and delete
controls only for resources owned by the requesting subscriber
* Apply ownership handling to destination, source, B-number,
and time sets across both Simple CF and PBX CF
* Display non-owned resources as read-only while keeping Select and
Unassign available for source and B-number condition lists
* Remove obsolete 404 handling from update and
delete owner-related actions
* Ensure time-set deletion always clears its loading state
Change-Id: I071a31a31fb95524d3f3a8e05cd0da830e688c9b
Quasar's position-engine gives up permanently if a popup measures
zero size within 50ms of being shown. Firefox uniquely collapses
visibility:collapse flex-context elements to zero size, so popups
built on QMenu/QPopupProxy (e.g. CscMoreMenu's three-dot menu)
could get stuck invisible in Firefox while working fine elsewhere.
Backport the upstream fix (not yet released in Quasar 2.21.2 or
2.23.3) by overriding .q-position-engine to use visibility:hidden
instead of visibility:collapse.
Change-Id: Ia6a99d2ea6361fb8d05fe445c4f79b3913a90b09
subscriberId is already part of the payload,
so there's no need to add it again. Backports
will be fixed separately.
Change-Id: I4f7b93f235665544acd4791c1ea6c00ff0fa1a2d
B-number sets, source sets, and time sets created via the CSC PBX
Seat page were being assigned to the subscriber admin instead of the
seat they were created for. Destinations were being assigned
already to Seat.
Pass the seat id in the creation payload for these resource types so
they are consistently assigned to the seat, matching destination
behavior.
Change-Id: I94216fb321d54dc18816d4646335b5a8a6bfeddb
* Previously, the resource was removed from only one CF type before
deletion. The backend then deleted any CF still referencing the
resource, causing groups to disappear. We amend the delete
resource logic to unlink the resource from any existing CF type.
* Added missing subscriber_id property for bnumberset
and sourceset deletion to make sure we clean up the
correct mapping before deleting the resource.
* Removed duplicate of normalizeFullMappingsResponse
Unassign the resource from all CF mappings before deleting it.
Change-Id: I5a2cd8ee7a057cdaeb281a83bfc3eabc2087cb68
* Following the backend changes, update the frontend
to retrieve the details about relevant resources
using the new parameter "expand: all".
* To avoid regression, add a method to normalize
the response to match the store structure with maps
for each resource and the general cfMapping object
* Simplify dataSucceeded mutation by storing only
relevant data and moving normalization into
dedicated methods
* Improve UX behaviour with a transition block for the
csc-cf-add-form and transition ease of sticky-page
Change-Id: I1da6fd109dc951d469cfe59d313ebd2bdc8dced3
- Upgrade libs to resolve high severity vulnerabilities.
- Add yarn resolutions for 'form-data' (axios) to
manually fix high vulnerabilities in non-dev dependencies.
- Update eslint-webpack-plugin to the latest available version.
- Note: The eslint-webpack-plugin upgrade does not fully resolve its
associated vulnerability. No manual resolution was added for it as
it is strictly a development dependency.
Change-Id: I471680a08a4ba12577c0b5cfa3ea7c00aff6d26d
* remove .yarn/releases/yarn-1.2.2.js
* new .yarn/releases/yarn-4.17.1.cjs
* migrate .yarnrc -> .yarnrc.yml
* additional yarnrc.yml:
* enableSripts: true (to trigger post install steps, such as binary
compilation
* disable telemetry
* limit approvedGitRepositories to "https://npm-registry.sipwise.com/*
* use classic node linker node-modules (instead of the new "pnp" one
as the latter has issues with webpack)
* remove debian/missing-sources/yarn-1.22.22.js
* add debian/missing-sources/yarn-4.17.1.cjs
* debian/rules use yarn-4.17.1.cjs
* adapt Docker build for Yarn 4. Yarn 4 resolves its executable using
the yarnPath configured in .yarnrc.yml. Copying the
release file directly to /tmp/yarn caused Yarn to look for
/tmp/.yarn/releases/yarn-4.17.1.cjs and fail. The build now
preserves the expected .yarn/ structure.
Change-Id: Ic65f06597022fb32777bc33179c4f242ff7bad02
* Shows DND in the admin seat preferences view using the
selected seat’s subscriber preferences and updates dnd
against that seat, not the admin subscriber
Change-Id: Id3e9b1109e486d408ff540ab8882fe28dec2ab0d
"apiGet" method adds "/" at the end of the URL
when using resource. All API v1 URL requests
need to end with a "/" or the backend redirects
them automatically.
Change-Id: Icfa49a4486da428c01cf1b6cd41c5152ae279a14
Add multi-field search for Seats tab with pagination support.
Replace two duplicated seat filter components with a single reusable.
CscSearchFilters component that accepts filterOptions and dataCyPrefix props.
Change-Id: I62cd40a9d85ac139de6f1ff434449657f4ce162f
Implements the following logic for the route call-settings:
- Route is accessible if no sub profile is assigned, or if a sub profile
is assigned and at least one of the "dnd" or "music_on_hold"
preferences is enabled
- DND toggle is hidden when a sub profile is assigned and the "dnd"
preference is off
- Music on hold toggle is hidden when a sub profile is assigned and
the "music_on_hold" preference is off
Change-Id: I3da52cb142ed1b60bf5c90b873cf515bb1fd35ce
* Create internal identifier for custom announcements
to act as terminal destinations for call forwarding
rules
Change-Id: Id6f64b08c686a860bf7acf05d8943262dad31d1b
callNumberNormalized was already used in startCall as the guard but wasn't mapped from Vuex,
so the condition was always undefined (falsy) and enter never triggered a call.
Adding it to mapGetters makes the check work.
Enter starts a call when there's input, and does nothing when the field is empty.
Change-Id: I1e3b1ba89e9da1f3933a542a710e87d3d67f67cb
* Fix device detail form not rendering on page 2+ by
adding a watcher for reactive data updates
* Add loading spinner while device preferences are loading
* Remove unused loadDevicePreferencesList call from list page mount
Change-Id: Icc0318126303763d5eab3a39568817a2c41e88e8
* Split call queue resource identity from subscriber ownership
* Use callQueue.id for row state, updates, and removal
* Use subscriber_id, with id fallback, for owner display lookup
* Send complete form payload with subscriberId and queue values
* Use setPreference when creating queue preferences
* Remove lodash usage from newly changed store/API lines
* Fix call queue removal loading state check
* Resolve dead call queue link in seat's pbx configuration menu
* Improve remove call queue flow
Change-Id: Iabf7382799866534de12eea6bc3db8ed13cfcb52
- Replace direct `useStore` usage with composable helpers
(useActions, useState, useGetters)
- Add `setPopupShow` action to wrap `popupShow` mutation
and eliminate mutations in favor of `setPopupShow` action
- Remove `usePbx` and `useUser` composables
- Update documentation
This prepares the codebase for eventual Pinia migration by:
- Avoiding mutations (Pinia has no mutations)
- Centralizing store access through helpers
- Enabling future migration with minimal component changes
Change-Id: Iddc63b8c3c39fe1a06bb6a78ef322f01fe77a9af
* Added a new Conference page under Extension Settings
where PBX subscribers can manage their own
conference_max_participants and conference_pin
* Page and fields are gated through subscriber profile
attributes for administrative purposes
* Restricted the route and menu entry to PBX admin users
and added the new Conference entry to the
Extension Settings menu
Change-Id: I002c79ce6653e1183c6348775184a5a92ea8f737
* Added Seat as a call forwarding destination option
* Enabled editing existing seat destinations in forwarding rules
* Seat search matches partial text and calls api on every stroke
Change-Id: I3b57406185167392380d2ec2d65db4447937229b
* Replaces PROFILE_ATTRIBUTES_MAP.* lookups for
PROFILE_ATTRIBUTE_MAP.managerSecretary and
PROFILE_ATTRIBUTE_MAP.autoAttendant one the
Manager Secretary and Auto Attendant submenu checks
Change-Id: I4b5395afa037bcd043357965a4f56d7d8d92de7a
- Removed "Hide number within own PBX" from PBX Seat creation form
- Removed "Hide number within own PBX" from PBX Seats actions menu
- Removed "Music on hold" from PBX Seats actions menu
These preferences are now only configurable in the PBX Seat details to avoid duplication and simplify the UI.
Change-Id: I8c9c8967bf4039f02b5848dea33285d04b0451c1
* Reworked call forwarding group item text to show
Forwarded to X for N seconds from the current timeout
* Added the necessary translations
* Refactors update logic for changedDestinationTimeout
with the use of a watcher
Change-Id: Ie0b4b8194c68b5cc3f5ddfac2a091be308e0e910
Fix default value for CQ part:
If the subscriber has call queue activated, use their wrap-up time
as the default value; otherwise, set the default value to 10.
Change-Id: I1e11417690d4119ce396939721cbc96f6c5ef9b8
* Fixes missing translation for "If not available"
in german
* Call back button on the subscriber phonebook
was moved before the more menu
Change-Id: I6daa0623173c0251c2c72149419bc8f122687473
* Created two PBX configuration fields for both
seat and group preferences
* Admin users can now specify the maximum number
of conference participants as well as the conference
pin if they so desire
* Fixes the PATCH flow so that it follows the following structure
1. create new: PATCH add
2. amend entry: PATCH replace
3. remove entry: PATCH remove
* We no longer use PATCH replace with an empty payload
to remove an entry
* Added label translations
Change-Id: I3e349c0d0cc896c6dcbb2ada0a9588e3b96c945a
- Convert all actions from .then()/.catch() chains to async/await
- Extract savePreference() helper to centralise error handling and
state commits, avoiding repetition across every action
- Extract updateBooleanPreference() helper. It covers the following
scenarios:
* new value is false: remove PATCH property in DB
* new value is true: add PATCH property in DB
* new value is true AND the value already exist in the
customer preferences: replace PATCH to amend property in DB
(added to avoid regression introduced by previous code, which
saved a property as false instead of removing it)s
- Add proper add/set/remove logic to updateBlockInList,
updateBlockOutList and updateBlockOutOverridePin: previously all
three always called setCustomerPreference regardless of whether the
preference existed or was empty
- Split logic to add, remove and edit customer preferences
Change-Id: Ie419de31631b9ef1b06653446dfbe1a33a10c225
When toggling multiple CFs on/off in quick succession,
the PATCH request returns inconsistent results,
randomly multiplying resources.
To avoid this, we now retrieve the updated mappings
using cfLoadMappings() after the PATCH request and
we disable the toggle while other
csc-cf-mappings-full actions are performed
This is a temporary fix while the backend team resolves
the root cause, as the work is already in the pipeline.
The fix has been applied only to the setMappingEnabled
method, as it appears to be the only one affected due
to the possibility of multiple consecutive calls.
The fix has been applied only to the setMappingEnabled method, as it appears to be the only one affected due to the possibility of multiple consecutive calls.
Change-Id: Ideb999e3871ea6b7f8a0d1a3b5979cd2ad88706e
* Created buttons to change the order of movable call
forwarding destinations
* Only destinations with DestinationType = Number are movable
* Moving a destination automatically patches the priority in
the backend
* Buttons show up only when destination is movable
Change-Id: Ie33091da291a1108aae10d7c00c72a1187854e5e