module.exports = {
    forceSync: function (object_name, record_id, fields) {
        Steedos.authRequest(`/api/workflow/v2/forcesync/${record_id}`, { 
            type: 'get', 
            success: (data)=>{
              SteedosUI.notification.success({
                  message: t('object_workflows_sync_history_instances_success')
              })
            },
            error: (req)=>{
              console.log('error===', req);
              SteedosUI.notification.error({
                  message: req.responseJSON.error
              })
            }
        });
    },
    forceSyncVisible: function(object_name, record_id, record_permissions){
        var perms, record;
      perms = {};
      if (record_permissions) {
        perms = record_permissions;
      } else {
        return false
      }
      return perms["allowEdit"];
    }
}