Skip to content

Commit

Permalink
Merge branch 'develop' into enhacement/chainingPeriodicCreations
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuSinergiaCRM committed Sep 23, 2024
2 parents 0d7a346 + 83bda77 commit 994fa8a
Show file tree
Hide file tree
Showing 130 changed files with 5,158 additions and 415 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<img width="180px" height="60px" src="https://github.com/SinergiaTIC/SinergiaCRM-SuiteCRM/assets/125350097/af3300d0-1b17-427c-b681-1971d39a1528" align="right" />
</a>

# SinergiaCRM 1.1.0
# SinergiaCRM

![Version (latest by date)](https://img.shields.io/github/v/release/SinergiaTIC/SinergiaCRM?label=Version)
[![Wiki](https://img.shields.io/badge/Information-Wiki-lightgray)](https://wikisuite.sinergiacrm.org)
[![LICENSE](https://img.shields.io/badge/License-AGPL_v3-orange.svg)](./LICENSE.txt)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5)](https://twitter.com/SinergiaCRM)
Expand Down
234 changes: 215 additions & 19 deletions SticInclude/SinergiaDA.php

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions SticInclude/js/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ function setEnabledStatus(elementId, clearField) {
} else {
$("#" + elementId, $form)
.prop("readonly", false);
$("#" + elementId, $form)
.prop("disabled", false);
$("#" + elementId, $form).parent().find("button")
.prop("disabled", false);
}
$("#" + elementId, $form)
.closest(".edit-view-row-item")
Expand Down Expand Up @@ -313,6 +317,10 @@ function setDisabledStatus(elementId, clearField) {
} else {
$("#" + elementId, $form)
.prop("readonly", true);
$("#" + elementId, $form)
.prop("disabled", true);
$("#" + elementId, $form).parent().find("button")
.prop("disabled", true);
}
$("#" + elementId, $form)
.closest(".edit-view-row-item")
Expand Down
72 changes: 72 additions & 0 deletions SticUpdates/Scripts/HideGroupOpportunitiesSubpanels.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

/**
* It is important that all the code included in this file can be executed in different updates,
* incorporating new operations, such as making new modules available.
**/

$GLOBALS['log']->debug(__METHOD__.'('.__LINE__.') hide stic_Group_Opportunities subpanel starting');

// HIDE MODULES FROM SUBPANELS IF MODULE IS NOT ENABLED ON THE MENU

// Set modules to hide
$modulesToHide = array(
0 => 'stic_Group_Opportunities',
);

require_once 'modules/MySettings/TabController.php';
$controller = new TabController();
$currentTabs = $controller->get_system_tabs();

$GLOBALS['log']->debug(__METHOD__.'('.__LINE__.') hide stic_Group_Opportunities subpanel', $currentTabs);

$modulesToHideNotEnabled = array_diff($modulesToHide, $currentTabs);
$GLOBALS['log']->debug(__METHOD__.'('.__LINE__.') hide stic_Group_Opportunities subpanel', $modulesToHideNotEnabled);
if (count($modulesToHideNotEnabled)> 0){
// This function needs to be customized if the file is copied.
function sticGroupOpportunitiesPrepareElementToHide(&$item, $key)
{
$item = strtolower($item);
}

array_walk($modulesToHideNotEnabled, 'sticGroupOpportunitiesPrepareElementToHide');

$GLOBALS['log']->debug(__METHOD__.'('.__LINE__.') hide stic_Group_Opportunities subpanel', $modulesToHideNotEnabled);

$administration = new Administration();
$currentSettings = $administration->retrieveSettings('MySettings');
$unserialized = unserialize(base64_decode($currentSettings->settings['MySettings_hide_subpanels']));

$GLOBALS['log']->debug(__METHOD__.'('.__LINE__.') hide stic_Group_Opportunities subpanel', $unserialized);

foreach($modulesToHideNotEnabled as $module) {
$unserialized[$module] = $module;
}

$serialized = base64_encode(serialize($unserialized));
$administration->saveSetting('MySettings', 'hide_subpanels', $serialized);

}



// Repairing and rebuilding
global $current_user;
$current_user = new User();
$current_user->getSystemUser();

// Reparación de roles para garantizar que los usuarios no administradores pueden acceder a los módulos
echo '<h3>Repairing roles</h3>';
require_once 'modules/ACL/install_actions.php';
$GLOBALS['log']->fatal('Line ' . __LINE__ . ': ' . __METHOD__ . ': Repairing roles');

// Reparamos también relaciones e índices para evitar incidencias con los nuevos módulos
echo '<h3>Rebuilding relationships</h3>';
require_once 'modules/Administration/RebuildRelationship.php';
$GLOBALS['log']->fatal('Line ' . __LINE__ . ': ' . __METHOD__ . ': Rebuilding relationships');

echo '<h3>Repairing indexes</h3>';
require_once "modules/Administration/RepairIndex.php";
$GLOBALS['log']->fatal('Line ' . __LINE__ . ': ' . __METHOD__ . ': Repairing indexes');

2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@

// STIC Custom 20231124 JBL - SemVer in SinergiaCRM
// STIC#1319
'sinergiacrm_version' => '1.6.3',
'sinergiacrm_version' => '1.6.5',
'js_custom_version' => 9,
'stic_show_update_alert' => 0,
// END STIC
Expand Down
28 changes: 28 additions & 0 deletions custom/Extension/application/Ext/Extensions/SDAVardefs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* This file is part of SinergiaCRM.
* SinergiaCRM is a work developed by SinergiaTIC Association, based on SuiteCRM.
* Copyright (C) 2013 - 2023 SinergiaTIC Association
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SinergiaTIC Association at email address [email protected].
*/

$extensions["SDAVardefs"] = array(
"section" => "SDAVardefs",
"extdir" => "SDAVardefs",
"file" => 'SDAVardefs.ext.php',
"module" => "");
4 changes: 4 additions & 0 deletions custom/Extension/application/Ext/Include/SticModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
$moduleList[] = 'stic_Custom_View_Customizations';
$moduleList[] = 'stic_Custom_View_Conditions';
$moduleList[] = 'stic_Custom_View_Actions';
$moduleList[] = 'stic_Group_Opportunities';

// Bean names for custom modules
// Although they should be singular ModuleBuilder outputs them in plural and we keep them this way
Expand Down Expand Up @@ -111,6 +112,7 @@
$beanList['stic_Custom_View_Customizations'] = 'stic_Custom_View_Customizations';
$beanList['stic_Custom_View_Conditions'] = 'stic_Custom_View_Conditions';
$beanList['stic_Custom_View_Actions'] = 'stic_Custom_View_Actions';
$beanList['stic_Group_Opportunities'] = 'stic_Group_Opportunities';

// Location of custom modules main class files
$beanFiles['stic_Accounts_Relationships'] = 'modules/stic_Accounts_Relationships/stic_Accounts_Relationships.php';
Expand Down Expand Up @@ -156,6 +158,8 @@
$beanFiles['stic_Custom_View_Customizations'] = 'modules/stic_Custom_View_Customizations/stic_Custom_View_Customizations.php';
$beanFiles['stic_Custom_View_Conditions'] = 'modules/stic_Custom_View_Conditions/stic_Custom_View_Conditions.php';
$beanFiles['stic_Custom_View_Actions'] = 'modules/stic_Custom_View_Actions/stic_Custom_View_Actions.php';
$beanFiles['stic_Group_Opportunities'] = 'modules/stic_Group_Opportunities/stic_Group_Opportunities.php';


// Modules in $modInvisList are hidden in the main menu, in reporting and as subpanels
$modInvisList[] = 'stic_Settings';
Expand Down
20 changes: 18 additions & 2 deletions custom/Extension/application/Ext/Language/ca_ES.SticLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
$app_list_strings['moduleList']['stic_Custom_View_Actions'] = 'Accions';
$app_list_strings['moduleList']['stic_Custom_View_Customizations'] = 'Personalitzacions';
$app_list_strings['moduleList']['stic_Custom_View_Conditions'] = 'Condicions';

$app_list_strings['moduleList']['stic_Group_Opportunities'] = 'Organitzacions subvencionades';
$app_list_strings['moduleListSingular']['Accounts'] = 'Organització';
$app_list_strings['moduleListSingular']['Contacts'] = 'Persona';
$app_list_strings['moduleListSingular']['Leads'] = 'Interessat';
Expand Down Expand Up @@ -178,7 +178,7 @@
$app_list_strings['moduleListSingular']['stic_Custom_View_Actions'] = 'Acció';
$app_list_strings['moduleListSingular']['stic_Custom_View_Customizations'] = 'Personalització';
$app_list_strings['moduleListSingular']['stic_Custom_View_Conditions'] = 'Condició';

$app_list_strings['moduleListSingular']['stic_Group_Opportunities'] = 'Organització subvencionada';
$app_list_strings['parent_type_display']['Accounts'] = 'Organitzacions';
$app_list_strings['parent_type_display']['Contacts'] = 'Persones';
$app_list_strings['parent_type_display']['Leads'] = 'Interessats';
Expand Down Expand Up @@ -216,6 +216,7 @@
$app_list_strings['parent_type_display']['stic_Training'] = 'Formació';
$app_list_strings['parent_type_display']['stic_Work_Experience'] = 'Experiència laboral';
$app_list_strings['parent_type_display']['stic_Skills'] = 'Competències';
$app_list_strings['parent_type_display']['stic_Group_Opportunities'] = 'Organitzacions subvencionades';

$app_list_strings['record_type_display']['Accounts'] = 'Organitzacions';
$app_list_strings['record_type_display']['Contacts'] = 'Persones';
Expand Down Expand Up @@ -254,6 +255,7 @@
$app_list_strings['record_type_display']['stic_Training'] = 'Formació';
$app_list_strings['record_type_display']['stic_Work_Experience'] = 'Experiència laboral';
$app_list_strings['record_type_display']['stic_Skills'] = 'Competències';
$app_list_strings['record_type_display']['stic_Group_Opportunities'] = 'Organitzacions subvencionades';

$app_list_strings['record_type_display_notes']['Accounts'] = 'Organitzacions';
$app_list_strings['record_type_display_notes']['Contacts'] = 'Persones';
Expand Down Expand Up @@ -292,6 +294,7 @@
$app_list_strings['record_type_display_notes']['stic_Training'] = 'Formació';
$app_list_strings['record_type_display_notes']['stic_Work_Experience'] = 'Experiència laboral';
$app_list_strings['record_type_display_notes']['stic_Skills'] = 'Competències';
$app_list_strings['record_type_display_notes']['stic_Group_Opportunities'] = 'Organitzacions subvencionades';

// Percentatges d'IVA vigents
$app_list_strings['vat_list']['21'] = '21%';
Expand Down Expand Up @@ -3516,6 +3519,19 @@
$app_list_strings['stic_custom_views_condition_values_list']['anniversary'] = 'Aniversari';
$app_list_strings['stic_custom_views_condition_values_list']['current_user'] = 'Usuari actual';

// Organitzacions subvencionades: Estat
$app_list_strings['stic_group_opportunities_status_list']['guest'] = 'Convidada';
$app_list_strings['stic_group_opportunities_status_list']['participating'] = 'Participant';
$app_list_strings['stic_group_opportunities_status_list']['rejected'] = 'Rebutjada';
$app_list_strings['stic_group_opportunities_status_list']['granted'] = 'Concedida';
$app_list_strings['stic_group_opportunities_status_list']['not_granted'] = 'No concedida';

// Organitzacions subvencionades: Estat de la documentació
$app_list_strings['stic_group_opportunities_doc_status_list']['not_required'] = 'No necessària';
$app_list_strings['stic_group_opportunities_doc_status_list']['requested'] = 'Sol·licitada';
$app_list_strings['stic_group_opportunities_doc_status_list']['delivered'] = 'Lliurada';
$app_list_strings['stic_group_opportunities_doc_status_list']['validated'] = 'Validada';


// Modificacions del core de SuiteCRM

Expand Down
21 changes: 18 additions & 3 deletions custom/Extension/application/Ext/Language/en_us.SticLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
$app_list_strings['moduleList']['stic_Custom_View_Actions'] = 'Actions';
$app_list_strings['moduleList']['stic_Custom_View_Customizations'] = 'Customizations';
$app_list_strings['moduleList']['stic_Custom_View_Conditions'] = 'Conditions';

$app_list_strings['moduleList']['stic_Group_Opportunities'] = 'Granted accounts';
$app_list_strings['moduleListSingular']['Accounts'] = 'Account';
$app_list_strings['moduleListSingular']['Contacts'] = 'Contact';
$app_list_strings['moduleListSingular']['Leads'] = 'Lead';
Expand Down Expand Up @@ -177,7 +177,7 @@
$app_list_strings['moduleListSingular']['stic_Custom_View_Actions'] = 'Action';
$app_list_strings['moduleListSingular']['stic_Custom_View_Customizations'] = 'Customization';
$app_list_strings['moduleListSingular']['stic_Custom_View_Conditions'] = 'Condition';

$app_list_strings['moduleListSingular']['stic_Group_Opportunities'] = 'Granted account';
$app_list_strings['parent_type_display']['Accounts'] = 'Accounts';
$app_list_strings['parent_type_display']['Contacts'] = 'Contacts';
$app_list_strings['parent_type_display']['Leads'] = 'Leads';
Expand Down Expand Up @@ -215,6 +215,7 @@
$app_list_strings['parent_type_display']['stic_Training'] = 'Training';
$app_list_strings['parent_type_display']['stic_Work_Experience'] = 'Work experience';
$app_list_strings['parent_type_display']['stic_Skills'] = 'Skills';
$app_list_strings['parent_type_display']['stic_Group_Opportunities'] = 'Granted accounts';

$app_list_strings['record_type_display']['Accounts'] = 'Accounts';
$app_list_strings['record_type_display']['Contacts'] = 'Contacts';
Expand Down Expand Up @@ -253,6 +254,7 @@
$app_list_strings['record_type_display']['stic_Training'] = 'Training';
$app_list_strings['record_type_display']['stic_Work_Experience'] = 'Work experience';
$app_list_strings['record_type_display']['stic_Skills'] = 'Skills';
$app_list_strings['record_type_display']['stic_Group_Opportunities'] = 'Granted accounts';

$app_list_strings['record_type_display_notes']['Accounts'] = 'Accounts';
$app_list_strings['record_type_display_notes']['Contacts'] = 'Contacts';
Expand Down Expand Up @@ -291,6 +293,7 @@
$app_list_strings['record_type_display_notes']['stic_Training'] = 'Training';
$app_list_strings['record_type_display_notes']['stic_Work_Experience'] = 'Work experience';
$app_list_strings['record_type_display_notes']['stic_Skills'] = 'Skills';
$app_list_strings['record_type_display_notes']['stic_Group_Opportunities'] = 'Granted accounts';

// Current VAT percentages (IVA)
$app_list_strings['vat_list']['21'] = '21%';
Expand Down Expand Up @@ -3515,6 +3518,19 @@
$app_list_strings['stic_custom_views_condition_values_list']['anniversary'] = 'Anniversary';
$app_list_strings['stic_custom_views_condition_values_list']['current_user'] = 'Current user';

// Granted accounts: Status
$app_list_strings['stic_group_opportunities_status_list']['guest'] = 'Guest';
$app_list_strings['stic_group_opportunities_status_list']['participating'] = 'Participating';
$app_list_strings['stic_group_opportunities_status_list']['rejected'] = 'Rejected';
$app_list_strings['stic_group_opportunities_status_list']['granted'] = 'Granted';
$app_list_strings['stic_group_opportunities_status_list']['not_granted'] = 'Not granted';

// Granted accounts: Documentation Status
$app_list_strings['stic_group_opportunities_doc_status_list']['not_required'] = 'Not required';
$app_list_strings['stic_group_opportunities_doc_status_list']['requested'] = 'Requested';
$app_list_strings['stic_group_opportunities_doc_status_list']['delivered'] = 'Delivered';
$app_list_strings['stic_group_opportunities_doc_status_list']['validated'] = 'Validated';


// SuiteCRM Core modifications

Expand Down Expand Up @@ -3559,4 +3575,3 @@
$app_list_strings['aow_date_type_list']['month'] = 'Months';
$app_list_strings['aow_date_type_list']['year'] = 'Years'; // New STIC item
$app_list_strings['aow_date_type_list']['business_hours'] = 'Business hours';

20 changes: 18 additions & 2 deletions custom/Extension/application/Ext/Language/es_ES.SticLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
$app_list_strings['moduleList']['stic_Custom_View_Actions'] = 'Acciones';
$app_list_strings['moduleList']['stic_Custom_View_Customizations'] = 'Personalizaciones';
$app_list_strings['moduleList']['stic_Custom_View_Conditions'] = 'Condiciones';

$app_list_strings['moduleList']['stic_Group_Opportunities'] = 'Organizaciones subvencionadas';
$app_list_strings['moduleListSingular']['Accounts'] = 'Organización';
$app_list_strings['moduleListSingular']['Contacts'] = 'Persona';
$app_list_strings['moduleListSingular']['Leads'] = 'Interesado';
Expand Down Expand Up @@ -178,7 +178,7 @@
$app_list_strings['moduleListSingular']['stic_Custom_View_Actions'] = 'Acción';
$app_list_strings['moduleListSingular']['stic_Custom_View_Customizations'] = 'Personalización';
$app_list_strings['moduleListSingular']['stic_Custom_View_Conditions'] = 'Condición';

$app_list_strings['moduleListSingular']['stic_Group_Opportunities'] = 'Organización subvencionada';
$app_list_strings['parent_type_display']['Accounts'] = 'Organizaciones';
$app_list_strings['parent_type_display']['Contacts'] = 'Personas';
$app_list_strings['parent_type_display']['Leads'] = 'Interesados';
Expand Down Expand Up @@ -216,6 +216,7 @@
$app_list_strings['parent_type_display']['stic_Training'] = 'Formación';
$app_list_strings['parent_type_display']['stic_Work_Experience'] = 'Experiencia laboral';
$app_list_strings['parent_type_display']['stic_Skills'] = 'Competencias';
$app_list_strings['parent_type_display']['stic_Group_Opportunities'] = 'Organizaciones subvencionadas';

$app_list_strings['record_type_display']['Accounts'] = 'Organizaciones';
$app_list_strings['record_type_display']['Contacts'] = 'Personas';
Expand Down Expand Up @@ -254,6 +255,7 @@
$app_list_strings['record_type_display']['stic_Training'] = 'Formación';
$app_list_strings['record_type_display']['stic_Work_Experience'] = 'Experiencia laboral';
$app_list_strings['record_type_display']['stic_Skills'] = 'Competencias';
$app_list_strings['record_type_display']['stic_Group_Opportunities'] = 'Organizaciones subvencionadas';

$app_list_strings['record_type_display_notes']['Accounts'] = 'Organizaciones';
$app_list_strings['record_type_display_notes']['Contacts'] = 'Personas';
Expand Down Expand Up @@ -292,6 +294,7 @@
$app_list_strings['record_type_display_notes']['stic_Training'] = 'Formación';
$app_list_strings['record_type_display_notes']['stic_Work_Experience'] = 'Experiencia laboral';
$app_list_strings['record_type_display_notes']['stic_Skills'] = 'Competencias';
$app_list_strings['record_type_display_notes']['stic_Group_Opportunities'] = 'Organizaciones subvencionadas';

// Porcentajes de IVA vigentes
$app_list_strings['vat_list']['21'] = '21%';
Expand Down Expand Up @@ -3516,6 +3519,19 @@
$app_list_strings['stic_custom_views_condition_values_list']['anniversary'] = 'Aniversario';
$app_list_strings['stic_custom_views_condition_values_list']['current_user'] = 'Usuario actual';

// Organizaciones subvencionadas: Estado
$app_list_strings['stic_group_opportunities_status_list']['guest'] = 'Invitada';
$app_list_strings['stic_group_opportunities_status_list']['participating'] = 'Participante';
$app_list_strings['stic_group_opportunities_status_list']['rejected'] = 'Rechazada';
$app_list_strings['stic_group_opportunities_status_list']['granted'] = 'Concedida';
$app_list_strings['stic_group_opportunities_status_list']['not_granted'] = 'No concedida';

// Organizaciones subvencionadas: Estado de la documentación
$app_list_strings['stic_group_opportunities_doc_status_list']['not_required'] = 'No necesaria';
$app_list_strings['stic_group_opportunities_doc_status_list']['requested'] = 'Solicitada';
$app_list_strings['stic_group_opportunities_doc_status_list']['delivered'] = 'Entregada';
$app_list_strings['stic_group_opportunities_doc_status_list']['validated'] = 'Validada';


// Modificaciones del core de SuiteCRM

Expand Down
Loading

0 comments on commit 994fa8a

Please sign in to comment.