tango-app-api-infra 3.3.3-beta.6 → 3.3.3-beta.7
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/package.json
CHANGED
|
@@ -1040,15 +1040,25 @@ export async function saveInfraEmailConfig( req, res ) {
|
|
|
1040
1040
|
let client = await findOneClient( { clientId: inputData.clientId } );
|
|
1041
1041
|
let intervaltimenew='';
|
|
1042
1042
|
let intervaltimeold='';
|
|
1043
|
-
if ( inputData.configuration.type ==='customize' ) {
|
|
1043
|
+
if ( inputData.configuration.type ==='customize'&& client.ticketConfigs.infraReport.type==='defined' ) {
|
|
1044
1044
|
intervaltimeold= `Starts at ${client.ticketConfigs.infraReport.startTime}, repeats every ${client.ticketConfigs.infraReport.interval} minutes, and ends at ${client.ticketConfigs.infraReport.endTime}`;
|
|
1045
1045
|
let oldtime=inputData.configuration.times.map( ( data ) => data.interval );
|
|
1046
1046
|
oldtime = Array.isArray( oldtime ) ? [ ...new Set( oldtime ) ].join( ', ' ) : '';
|
|
1047
1047
|
intervaltimenew = `occurs at ${oldtime}`; ;
|
|
1048
|
-
} else {
|
|
1048
|
+
} else if ( inputData.configuration.type==='defined'&&client.ticketConfigs.infraReport.type==='customize' ) {
|
|
1049
|
+
let oldtime=client.ticketConfigs.infraReport.times.map( ( data ) => data.interval );
|
|
1050
|
+
oldtime = Array.isArray( oldtime ) ? [ ...new Set( oldtime ) ].join( ', ' ) : '';
|
|
1051
|
+
intervaltimeold=`occurs at ${oldtime}`;
|
|
1052
|
+
intervaltimenew=`Starts at ${inputData.configuration.startTime}, repeats every ${inputData.configuration.interval} minutes, and ends at ${inputData.configuration.endTime}`;
|
|
1053
|
+
} else if ( inputData.configuration.type ==='customize'&& client.ticketConfigs.infraReport.type==='customize' ) {
|
|
1049
1054
|
let oldtime=client.ticketConfigs.infraReport.times.map( ( data ) => data.interval );
|
|
1055
|
+
let newtime=inputData.configuration.times.map( ( data ) => data.interval );
|
|
1050
1056
|
oldtime = Array.isArray( oldtime ) ? [ ...new Set( oldtime ) ].join( ', ' ) : '';
|
|
1057
|
+
newtime = Array.isArray( newtime ) ? [ ...new Set( newtime ) ].join( ', ' ) : '';
|
|
1051
1058
|
intervaltimeold=`occurs at ${oldtime}`;
|
|
1059
|
+
intervaltimenew=`occurs at ${newtime}`;
|
|
1060
|
+
} else if ( inputData.configuration.type ==='defined'&& client.ticketConfigs.infraReport.type==='defined' ) {
|
|
1061
|
+
intervaltimeold=`Starts at ${client.ticketConfigs.infraReport.startTime}, repeats every ${client.ticketConfigs.infraReport.interval} minutes, and ends at ${client.ticketConfigs.infraReport.endTime}`;
|
|
1052
1062
|
intervaltimenew=`Starts at ${inputData.configuration.startTime}, repeats every ${inputData.configuration.interval} minutes, and ends at ${inputData.configuration.endTime}`;
|
|
1053
1063
|
}
|
|
1054
1064
|
await updateoneClient( { clientId: inputData.clientId }, {
|