@guillotinaweb/react-gmi 0.22.2 → 0.22.3

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 CHANGED
@@ -1,3 +1,9 @@
1
+ 0.22.3
2
+ ------
3
+ - fix: remove items path #167
4
+ - feat: select principals show id if fullname not exist
5
+ - chore: update dependences
6
+
1
7
  0.22.2
2
8
  ------
3
9
  - chore: update dependences
@@ -762,14 +762,6 @@ function useConfig(cfg) {
762
762
  return calculated;
763
763
  }
764
764
 
765
- var getId = function getId(item) {
766
- if (item['@id']) {
767
- return item['@id'];
768
- }
769
-
770
- return item['@absolute_url'];
771
- };
772
-
773
765
  function RemoveItems(props) {
774
766
  var removeItems = function removeItems() {
775
767
  try {
@@ -777,8 +769,7 @@ function RemoveItems(props) {
777
769
  setLoading(true);
778
770
  var actions = items.map(function (item) {
779
771
  try {
780
- console.log(item);
781
- return Promise.resolve(Ctx.client.delete(getId(item))).then(function (res) {
772
+ return Promise.resolve(Ctx.client.delete("" + Ctx.path + item['@name'])).then(function (res) {
782
773
  var _temp = function () {
783
774
  if (!res.ok) {
784
775
  return Promise.resolve(res.json()).then(function (err) {
@@ -4990,7 +4981,7 @@ function AddPermission(_ref) {
4990
4981
  });
4991
4982
  var users = principalsData.users.map(function (user) {
4992
4983
  return {
4993
- text: user.fullname,
4984
+ text: user.fullname || user.id,
4994
4985
  value: user.id
4995
4986
  };
4996
4987
  });