@cocreate/organizations 1.12.0 → 1.13.0
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/client.js +7 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.13.0](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.12.0...v1.13.0) (2023-05-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* form getData and setDocumentId ([5ed4371](https://github.com/CoCreate-app/CoCreate-organizations/commit/5ed4371103578249764add885bcc0cd7e896ab7d))
|
|
7
|
+
|
|
1
8
|
# [1.12.0](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.11.9...v1.12.0) (2023-05-10)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import crud from '@cocreate/crud-client';
|
|
2
2
|
import indexeddb from '@cocreate/indexeddb';
|
|
3
3
|
import action from '@cocreate/actions';
|
|
4
|
-
import
|
|
4
|
+
import form from '@cocreate/form';
|
|
5
5
|
|
|
6
6
|
const CoCreateOrganization = {
|
|
7
7
|
|
|
8
8
|
createOrg: async function(btn) {
|
|
9
|
-
let
|
|
10
|
-
if (!
|
|
9
|
+
let formEl = btn.closest("form");
|
|
10
|
+
if (!formEl) return;
|
|
11
11
|
|
|
12
|
-
let organization = getData(
|
|
13
|
-
let user = getData(
|
|
12
|
+
let organization = form.getData(formEl, 'organizations')
|
|
13
|
+
let user = form.getData(formEl, 'users')
|
|
14
14
|
|
|
15
15
|
let documents = indexeddb.generateDB(organization, user)
|
|
16
16
|
|
|
@@ -19,8 +19,8 @@ const CoCreateOrganization = {
|
|
|
19
19
|
broadcastBrowser: false
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
setDocumentId(
|
|
23
|
-
setDocumentId(
|
|
22
|
+
form.setDocumentId(formEl, organization)
|
|
23
|
+
form.setDocumentId(formEl, user)
|
|
24
24
|
|
|
25
25
|
document.dispatchEvent(new CustomEvent('createdOrg', {
|
|
26
26
|
detail: response
|
|
@@ -107,6 +107,4 @@ action.init({
|
|
|
107
107
|
},
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
CoCreateOrganization.init();
|
|
111
|
-
|
|
112
110
|
export default CoCreateOrganization;
|