forked from jortilles/EDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'reporting' into SDA#53
- Loading branch information
Showing
54 changed files
with
2,165 additions
and
1,247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,7 @@ then | |
mongosh --eval 'db.createCollection("features")' EDA | ||
mongosh --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111110"), "role": "EDA_ADMIN_ROLE", "name" : "EDA_ADMIN", "users":[ ObjectId("135792467811111111111111") ] } )' EDA | ||
mongosh --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111113"), "role": "EDA_USER_ROLE", "name" : "RO", "users":[] } )' EDA | ||
|
||
mongosh --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111115"), "role": "EDA_USER_ROLE", "name" : "EDA_DATASOURCE_CREATOR", "users":[] } )' EDA | ||
mongosh --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111115"), "role": "EDA_USER_ROLE", "name" : "EDA_DATASOURCE_CREATOR", "users":[] } )' EDA | ||
mongosh --eval 'db.users.insert( { "_id" : ObjectId("135792467811111111111111"), "role" : [ ObjectId("135792467811111111111110") ], "name" : "EDA", "email" : "[email protected]", "password" : "$2a$10$J48xu5KAqobLzvD8FX1LOem7NZUMuXPHID1uSHzbzTbM.wGFPXjb2" } )' EDA | ||
mongosh --eval ' db.users.insert( { "_id" : ObjectId("135792467811111111111112"), "role" : [], "name" : "edaanonim", "email" : "[email protected]", "password" : "$2a$10$ziukAcgjgTe2XPmjO1xsruKJW1HlX0I2pvCiKZHQ69DdaCzgZA4/2" } ) ' EDA | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Modifica la propiedad `minimumFractionDigits` de un objeto basado en condiciones específicas. | ||
* Se utiliza para forzar a dos decimales los calculos de promedio en SinergiaDA | ||
* https://github.com/SinergiaTIC/SinergiaDA/pull/67 | ||
* | ||
* @param {Object} target - El objeto al cual está adjunto el descriptor. | ||
* @param {string} propertyKey - La clave de la propiedad a la que se está adjuntando el descriptor. | ||
* @param {any} descriptor - El descriptor de propiedad para la función. | ||
* @returns {any} El descriptor modificado. | ||
* | ||
* La función intercepta el llamado a la propiedad y modifica el objeto `el`. | ||
* Si `el` no tiene la propiedad `minimumFractionDigits`, se establece a 0. | ||
* Si `el.aggregation_type` es 'avg', se establece `minimumFractionDigits` a 2. | ||
*/ | ||
export function muSqlBuilderServiceCustomGetMinFractionDigits(target: Object, propertyKey: string, descriptor: any) { | ||
descriptor.value = function(el: any) { | ||
if (!el.hasOwnProperty("minimumFractionDigits")) { | ||
el.minimumFractionDigits = 0; | ||
} | ||
/*SDA CUSTOM*/ if (el.aggregation_type === "avg") { | ||
/*SDA CUSTOM*/ el.minimumFractionDigits = 2; | ||
/*SDA CUSTOM*/ | ||
} | ||
return el; | ||
}; | ||
return descriptor; | ||
} |
Oops, something went wrong.