jamespot-front-business 1.1.92 → 1.1.94

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/dist/cjs.js CHANGED
@@ -1156,7 +1156,7 @@ const fetchComments = toolkit.createAsyncThunk('commentList/fetchCommentList', (
1156
1156
  try {
1157
1157
  const res = yield extra.jApi.article.getComments(params, {
1158
1158
  format: 'raw-list',
1159
- formatExtension: ['actions'],
1159
+ formatExtension: ['actions', 'extraBotRedacted'],
1160
1160
  });
1161
1161
  return { idArticle: params.idArticle, list: res.result };
1162
1162
  }
@@ -1395,9 +1395,17 @@ const toggleExtraBotActivation = toolkit.createAsyncThunk('extraBot/toggleActiva
1395
1395
  try {
1396
1396
  const enabled = !extraBot.enabled;
1397
1397
  const res = (yield extra.jApi.article.update(Object.assign(Object.assign({}, extraBot), { enabled }), { format: jamespot.Format.VIEW })).result;
1398
- dispatch(Toast.actions.success({
1399
- label: enabled ? 'APP_ExtraBot_Toast_ActivationSuccess' : 'APP_ExtraBot_Toast_DeactivationSuccess',
1400
- }));
1398
+ if (res.enabled !== extraBot.enabled) {
1399
+ dispatch(Toast.actions.success({
1400
+ label: enabled ? 'APP_ExtraBot_Toast_ActivationSuccess' : 'APP_ExtraBot_Toast_DeactivationSuccess',
1401
+ }));
1402
+ dispatch(fetchExtraBotListAll());
1403
+ }
1404
+ else {
1405
+ dispatch(Toast.actions.error({
1406
+ label: 'APP_ExtraBot_Toast_FailedToChangeActivation',
1407
+ }));
1408
+ }
1401
1409
  return res;
1402
1410
  }
1403
1411
  catch (err) {
@@ -1414,8 +1422,9 @@ const saveExtraBot = toolkit.createAsyncThunk('extraBot/save', ({ extraBot }, {
1414
1422
  let user;
1415
1423
  delete data.avatar;
1416
1424
  if (extraBot.uri) {
1417
- res = (yield extra.jApi.article.update(data, { format: jamespot.Format.VIEW }))
1418
- .result;
1425
+ res = (yield extra.jApi.article.update(data, {
1426
+ format: jamespot.Format.VIEW,
1427
+ })).result;
1419
1428
  user = (yield extra.jApi.extraBot.updateBot(res.uri)).result;
1420
1429
  }
1421
1430
  else {
@@ -3115,6 +3124,24 @@ const widgetEmailsImapContent = {
3115
3124
  emailsPromptStatus: 'shared',
3116
3125
  };
3117
3126
 
3127
+ const widgetLuccaAbsenceDefinition = {
3128
+ label: 'WIDGET_Lucca_Absence',
3129
+ description: 'WIDGET_Lucca_Absence_Text',
3130
+ name: jamespot.WidgetsName.LuccaAbsence,
3131
+ img: '/img/fast-intranet/widget-lucca-absence.png',
3132
+ available: true,
3133
+ displayLevel: [1, 2, 3],
3134
+ panel: {
3135
+ useWrapper: true,
3136
+ useEditor: true,
3137
+ useSelection: true,
3138
+ useWidgets: false,
3139
+ },
3140
+ };
3141
+ const widgetLuccaAbsenceContent = {
3142
+ url: '',
3143
+ };
3144
+
3118
3145
  function widgetDefinition(name) {
3119
3146
  switch (name) {
3120
3147
  default:
@@ -3147,6 +3174,8 @@ function widgetDefinition(name) {
3147
3174
  return widgetCalendarCalDavDefinition;
3148
3175
  case 'widget-contact-cardDav':
3149
3176
  return widgetContactCardDavDefinition;
3177
+ case 'widget-lucca-absence':
3178
+ return widgetLuccaAbsenceDefinition;
3150
3179
  case 'widget-emails-imap':
3151
3180
  return widgetEmailsImapDefinition;
3152
3181
  }
@@ -3169,6 +3198,8 @@ function widget(name) {
3169
3198
  function content(name) {
3170
3199
  switch (name) {
3171
3200
  default:
3201
+ case 'widget-lucca-absence':
3202
+ return Object.assign({}, widgetLuccaAbsenceContent);
3172
3203
  case 'widget-article-attachment':
3173
3204
  return Object.assign({}, widgetArticleAttachmentContent);
3174
3205
  case 'widget-presence':