mumuki-laboratory 9.0.3 → 9.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mumuki_laboratory/application/organization.js +32 -0
- data/app/assets/javascripts/mumuki_laboratory/application/submissions-store.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/user.js +33 -0
- data/app/views/layouts/_main.html.erb +4 -0
- data/lib/mumuki/laboratory/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c79de66ab1c8248e5715cd1e54ac8e4b1e426fb26bc0a69b35539ba19eb954da
|
4
|
+
data.tar.gz: 39cbfb28e86a6ae64f5a1164731d472ca65be3bec82d9f1ed6f159273512b078
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed9430f79c8f92f7b02264aa84f7dc757a7ff05915fcdd17e93a5fe4b7aaac5cfd0d87fadec66ce0d4ac204cd270f08fafc1550a986bd367314f5e7130c360d4
|
7
|
+
data.tar.gz: 8669d687ca7f70178cab77c25f698eef49a58eb74957ed274c73fe6fdf0c6f9139c5963f5c57b08a92ed874a97c6b648030c1be87cd34b107cb831db156e0113
|
@@ -0,0 +1,32 @@
|
|
1
|
+
mumuki.organization = {
|
2
|
+
|
3
|
+
/**
|
4
|
+
* The current organization's id
|
5
|
+
*
|
6
|
+
* @type {number?}
|
7
|
+
* */
|
8
|
+
_id: null,
|
9
|
+
|
10
|
+
/**
|
11
|
+
* The current organization's id
|
12
|
+
*
|
13
|
+
* @type {number?}
|
14
|
+
* */
|
15
|
+
get id() {
|
16
|
+
return this._id;
|
17
|
+
},
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Set global current organization information
|
21
|
+
*/
|
22
|
+
load() {
|
23
|
+
const $muOrganizationId = $('#mu-organization-id');
|
24
|
+
if ($muOrganizationId.length) {
|
25
|
+
this._id = $muOrganizationId.val();
|
26
|
+
} else {
|
27
|
+
this._id = null;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
};
|
31
|
+
|
32
|
+
mumuki.load(() => mumuki.organization.load());
|
@@ -1,3 +1,34 @@
|
|
1
|
+
mumuki.user = {
|
2
|
+
|
3
|
+
/**
|
4
|
+
* The current user's id
|
5
|
+
*
|
6
|
+
* @type {number?}
|
7
|
+
* */
|
8
|
+
_id: null,
|
9
|
+
|
10
|
+
/**
|
11
|
+
* The current user's id
|
12
|
+
*
|
13
|
+
* @type {number?}
|
14
|
+
* */
|
15
|
+
get id() {
|
16
|
+
return this._id;
|
17
|
+
},
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Set global current user information
|
21
|
+
*/
|
22
|
+
load() {
|
23
|
+
const $muUserId = $('#mu-user-id');
|
24
|
+
if ($muUserId.length) {
|
25
|
+
this._id = $muUserId.val();
|
26
|
+
} else {
|
27
|
+
this._id = null;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
};
|
31
|
+
|
1
32
|
mumuki.load(() => {
|
2
33
|
const $userMenuHeader = $('.mu-user-menu-header');
|
3
34
|
let onUserProfile = document.querySelector('.mu-profile-info') !== null;
|
@@ -17,4 +48,6 @@ mumuki.load(() => {
|
|
17
48
|
$userMenuHeader.click();
|
18
49
|
}
|
19
50
|
});
|
51
|
+
|
52
|
+
mumuki.user.load()
|
20
53
|
});
|
@@ -18,6 +18,10 @@
|
|
18
18
|
<%= login_form.header_html %>
|
19
19
|
</head>
|
20
20
|
<body>
|
21
|
+
|
22
|
+
<%= hidden_field_tag "mu-user-id", current_user&.id %>
|
23
|
+
<%= hidden_field_tag "mu-organization-id", Organization.current.id %>
|
24
|
+
|
21
25
|
<% if should_choose_organization? %>
|
22
26
|
<%= render partial: 'layouts/organization_chooser' %>
|
23
27
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.
|
4
|
+
version: 9.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -427,6 +427,7 @@ files:
|
|
427
427
|
- app/assets/javascripts/mumuki_laboratory/application/multiple-files.js
|
428
428
|
- app/assets/javascripts/mumuki_laboratory/application/multiple-scenarios.js
|
429
429
|
- app/assets/javascripts/mumuki_laboratory/application/number-counter.js
|
430
|
+
- app/assets/javascripts/mumuki_laboratory/application/organization.js
|
430
431
|
- app/assets/javascripts/mumuki_laboratory/application/pin.js
|
431
432
|
- app/assets/javascripts/mumuki_laboratory/application/popover.js
|
432
433
|
- app/assets/javascripts/mumuki_laboratory/application/primary.js
|