Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
6888ba0
fix(libs): keep catering favourites apart from desks and cap desk too…
MrYuion Oct 30, 2026
1037946
refactor(libs): remove unused components, pipes and upload permission…
MrYuion Oct 30, 2026
1df3822
refactor(libs): remove unused code from common, users and payments
MrYuion Oct 30, 2026
ec28dbd
refactor(libs): remove unused code from bookings, assets, catering an…
MrYuion Oct 30, 2026
167e4e7
refactor(mocks): remove unused mock endpoints and data helpers
MrYuion Oct 30, 2026
52ee6ad
refactor(libs): share one helper for toggling favourites
MrYuion Oct 30, 2026
8fbe887
refactor(assets): share the hidden asset category and type lookup
MrYuion Oct 30, 2026
6f4288f
refactor(form-fields): share the upload helper and merge compact-counter
MrYuion Oct 30, 2026
705c396
refactor(mocks): build asset CRUD mocks from one helper
MrYuion Oct 30, 2026
c0d78dd
refactor(libs): share the zone rules loader and app version details
MrYuion Oct 30, 2026
9a10550
refactor(libs): add provideValueAccessor for form field providers
MrYuion Oct 30, 2026
6418c72
refactor(common): build the time zone list from the browser
MrYuion Oct 30, 2026
56c290b
fix(common): use current IANA names in the time zone list
MrYuion Nov 2, 2026
df5d0d4
docs(e2e): name the current locker bank query in the seed comment
MrYuion Nov 2, 2026
c1061fa
refactor(concierge): remove the unused desks topbar
MrYuion Nov 2, 2026
c299951
refactor(concierge): share the desk CSV import
MrYuion Nov 2, 2026
0966141
refactor(assets): share the desk asset lookup by legacy id
MrYuion Nov 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .fallowrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"libs/**/src/lib/**/*.ts",
"libs/**/src/test-setup.ts",
"libs/mocks/src/empty.ts",
"libs/mocks/src/mocks.ts",
"shared/assets/**",
"shared/styles/**",
"tools/**/*.js",
Expand Down
5 changes: 2 additions & 3 deletions apps/concierge/e2e/local/concierge-desks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
*
* 2. **The listing shows one day, and `?date=` does not work on this route.**
* `DesksComponent` reads only `zone_ids` from the query string and returns
* early without it; the `date` parameter is handled by
* `desks-topbar.component.ts`, which is referenced only by unit tests and is
* not rendered here. So these specs book for TODAY.
* early without it; nothing on this route reads the `date` parameter. So
* these specs book for TODAY.
*
* ## Why every assertion ends at the backend
*
Expand Down
10 changes: 1 addition & 9 deletions apps/concierge/src/app/desks/desks-manage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatTooltipModule } from '@angular/material/tooltip';
import {
AsyncHandler,
csvToJson,
Desk,
i18n,
loadTextFileFromInputEvent,
notifyError,
notifySuccess,
OrganisationService,
randomInt,
settingSignal,
SettingsService,
} from '@placeos/common';
Expand Down Expand Up @@ -386,13 +384,7 @@ export class DesksManageComponent extends AsyncHandler {
throw e;
});
try {
const list = csvToJson(data) || [];
this._state.addDesks(
list.map((_) => ({
..._,
id: _.id || `desk-${randomInt(999_999)}`,
})),
);
this._state.importDesksCsv(data);
} catch (e) {
console.error(e);
}
Expand Down
12 changes: 12 additions & 0 deletions apps/concierge/src/app/desks/desks-state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
AsyncHandler,
Booking,
BuildingLevel,
csvToJson,
Desk,
downloadFile,
getTimezoneDifferenceInHours,
Expand Down Expand Up @@ -510,6 +511,17 @@ export class DesksStateService extends AsyncHandler {
downloadFile('desks.csv', jsonToCsv(rows));
}

/** Save the desks in CSV text. Rows without an `id` get a new one. */
public importDesksCsv(csv: string) {
const rows: Partial<Desk>[] = csvToJson(csv) || [];
return this.addDesks(
rows.map((row) => ({
...row,
id: row.id || `desk-${randomInt(999_999)}`,
})),
);
}

/**
* Save new or imported desks. Pass imported CSV rows as plain objects, not
* `Desk` instances, so only the row's own columns update an existing desk.
Expand Down
Loading
Loading