@things-factory/saas 10.1.303 → 10.1.305

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.
@@ -56,15 +56,16 @@ let SaasAccountList = class SaasAccountList extends localize(i18next)(PageView)
56
56
  * picked rows from the selection bar over the grid (F06). One's own accounts are read whole, with nothing to pick.
57
57
  */
58
58
  render() {
59
- return html `${this.mine
60
- ? nothing
61
- : html `<ox-assistant-selection-bar
59
+ return html `<ox-grist class="page-fill" search-mode="term" .mode=${isMobileDevice() ? 'CARD' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active && !this.mine}>
60
+ ${!this.mine
61
+ ? html `<ox-assistant-selection-bar
62
+ slot="selection"
62
63
  .gridOf=${() => this.grist}
63
64
  name=${i18next.t('title.saas-account-list')}
64
65
  .assistant=${false}
65
66
  .actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this.save(true) }]}
66
- ></ox-assistant-selection-bar>`}
67
- <ox-grist class="page-fill" search-mode="term" .mode=${isMobileDevice() ? 'CARD' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active && !this.mine}>
67
+ ></ox-assistant-selection-bar>`
68
+ : nothing}
68
69
  <div slot="headroom" class="header">
69
70
  <div class="filters"><ox-filters-form without-search autofocus></ox-filters-form></div>
70
71
  </div>
@@ -93,7 +94,8 @@ let SaasAccountList = class SaasAccountList extends localize(i18next)(PageView)
93
94
  title: i18next.t(this.mine ? 'text.my-saas-account-empty' : 'text.saas-account-empty'),
94
95
  description: i18next.t(this.mine ? 'text.my-saas-account-empty-description' : 'text.saas-account-empty-description')
95
96
  },
96
- list: { fields: ['name', 'identifier'], details: ['purpose', 'admins'] },
97
+ /* On a phone: the account and its identifier, then its status, what it is for, who administers it and when it closed - each with its name. */
98
+ list: { fields: ['name', 'identifier'], details: ['status', 'purpose', 'admins', 'closedOn'], labeled: true },
97
99
  columns: [
98
100
  /* A row's state (new, changed); a new row's mark removes it until it is saved (data-grist 행 제거). */
99
101
  { type: 'gutter', gutterName: 'dirty' },
@@ -1,4 +1,5 @@
1
1
  import '@operato/data-grist/ox-grist.js';
2
+ import '@things-factory/ai-assistant/dist-client/index.js';
2
3
  import { PageView } from '@operato/shell';
3
4
  type Tab = 'subscriptions' | 'seats' | 'admins';
4
5
  declare const SaasAccountPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
@@ -20,6 +21,8 @@ export declare class SaasAccountPage extends SaasAccountPage_base {
20
21
  private get account();
21
22
  private get subscriptions();
22
23
  private get subscriptionId();
24
+ /** Whether the open tab's rows are written here - not the admins unless one keeps the account. */
25
+ private get editing();
23
26
  get context(): {
24
27
  title: any;
25
28
  actions: ({
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import '@operato/data-grist/ox-grist.js';
3
+ import '@things-factory/ai-assistant/dist-client/index.js';
3
4
  import gql from 'graphql-tag';
4
5
  import { css, html, nothing } from 'lit';
5
6
  import { customElement, query, state } from 'lit/decorators.js';
@@ -96,12 +97,14 @@ let SaasAccountPage = class SaasAccountPage extends localize(i18next)(PageView)
96
97
  get subscriptionId() {
97
98
  return this.subscriptionAsked || this.seatPlans()[0]?.id || '';
98
99
  }
100
+ /** Whether the open tab's rows are written here - not the admins unless one keeps the account. */
101
+ get editing() {
102
+ return this.tab !== 'admins' || !!this.keeper;
103
+ }
99
104
  get context() {
100
- const editing = this.tab !== 'admins' || this.keeper;
101
- const actions = editing && (this.tab !== 'seats' || this.subscriptionId)
105
+ const actions = this.editing && (this.tab !== 'seats' || this.subscriptionId)
102
106
  ? [
103
107
  { title: i18next.t('button.add'), icon: 'add', action: () => this.grist.addRecordToTop(this.blank()) },
104
- { title: i18next.t('button.delete'), action: () => this.save(true), ...CommonButtonStyles.delete },
105
108
  { title: i18next.t('button.save'), action: () => this.save(), ...CommonButtonStyles.save }
106
109
  ]
107
110
  : [];
@@ -163,7 +166,17 @@ let SaasAccountPage = class SaasAccountPage extends localize(i18next)(PageView)
163
166
  : html `<div class="empty">${i18next.t('text.saas-seats-no-plan')}</div>`
164
167
  : nothing}
165
168
  ${this.gristConfig && this.account && (this.tab !== 'seats' || this.subscriptionId)
166
- ? html `<ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>`
169
+ ? html `<ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
170
+ ${this.editing
171
+ ? html `<ox-assistant-selection-bar
172
+ slot="selection"
173
+ .gridOf=${() => this.grist}
174
+ name=${this.account?.name ?? i18next.t('title.saas-account-page')}
175
+ .assistant=${false}
176
+ .actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this.save(true) }]}
177
+ ></ox-assistant-selection-bar>`
178
+ : nothing}
179
+ </ox-grist>`
167
180
  : nothing}
168
181
  `;
169
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/saas",
3
- "version": "10.1.303",
3
+ "version": "10.1.305",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "files": [
@@ -51,17 +51,17 @@
51
51
  "@operato/shell": "^10.29.69",
52
52
  "@operato/styles": "^10.29.1",
53
53
  "@operato/utils": "^10.0.0",
54
- "@things-factory/accounting": "^10.1.303",
55
- "@things-factory/ai-assistant": "^10.1.303",
56
- "@things-factory/asset": "^10.1.303",
57
- "@things-factory/auth-base": "^10.1.303",
58
- "@things-factory/biz-base": "^10.1.303",
59
- "@things-factory/fact-change": "^10.1.303",
60
- "@things-factory/i18n-base": "^10.1.303",
61
- "@things-factory/organization": "^10.1.303",
62
- "@things-factory/shell": "^10.1.303",
54
+ "@things-factory/accounting": "^10.1.305",
55
+ "@things-factory/ai-assistant": "^10.1.304",
56
+ "@things-factory/asset": "^10.1.305",
57
+ "@things-factory/auth-base": "^10.1.304",
58
+ "@things-factory/biz-base": "^10.1.304",
59
+ "@things-factory/fact-change": "^10.1.304",
60
+ "@things-factory/i18n-base": "^10.1.304",
61
+ "@things-factory/organization": "^10.1.304",
62
+ "@things-factory/shell": "^10.1.304",
63
63
  "graphql-tag": "^2.12.6",
64
64
  "lit": "^3.1.2"
65
65
  },
66
- "gitHead": "2d5888ebfc0a004b000a4aa3dfb8ff9561e75ff9"
66
+ "gitHead": "17267290988bb8e80602dc99dd4e0289ada78f6e"
67
67
  }