Skip to content

Commit 9d3516d

Browse files
committed
Merge branch 'stable'
2 parents 70d2593 + 2b62829 commit 9d3516d

File tree

9 files changed

+21
-10
lines changed

9 files changed

+21
-10
lines changed

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationAreaRulePlanningsServiceHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
using System;
23
using System.Collections.Generic;
34
using System.Linq;

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationTaskTrackerHelper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public static async Task<OperationDataResult<List<TaskTrackerModel>>> Index(
7070
.Select(x => new
7171
{
7272
x.PropertyId, x.PlanningId, x.Deadline, x.MicrotingSdkCaseId, x.MicrotingSdkeFormId, x.Id, x.AreaId,
73-
x.PlanningCaseSiteId
73+
x.PlanningCaseSiteId,
74+
x.MovedToExpiredFolder
7475
})
7576
.ToListAsync();
7677

@@ -289,6 +290,7 @@ public static async Task<OperationDataResult<List<TaskTrackerModel>>> Index(
289290
SdkFolderName =
290291
folderTranslations.FirstOrDefault(x => x.FolderId == planning.SdkFolderId) == null ? "" : folderTranslations.First(x => x.FolderId == planning.SdkFolderId).Name,
291292
CreatedInWizard = areaRuleCreatedInWizard,
293+
MovedToExpiredFolder = compliance.MovedToExpiredFolder
292294
};
293295

294296
if (complianceModel.SdkCaseId == 0 && complianceModel.DeadlineTask < dateTimeNow)

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/WorkOrderHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
using System;
23
using System.Collections.Generic;
34
using System.Globalization;

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Files/BackendConfigurationFileRequestModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
SOFTWARE.
2323
*/
2424

25+
#nullable enable
2526
namespace BackendConfiguration.Pn.Infrastructure.Models.Files;
2627

2728
using Microting.eFormApi.BasePn.Infrastructure.Models.Common;

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/TaskTracker/TaskTrackerModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class TaskTrackerModel
4747
/// <summary>
4848
/// Gets or sets the tags of the task tracker model.
4949
/// </summary>
50-
public List<CommonTagModel> Tags { get; set; }
50+
public List<CommonTagModel> Tags { get; set; }
5151
= [];
5252

5353
/// <summary>
@@ -130,4 +130,6 @@ public class TaskTrackerModel
130130
public string SdkFolderName { get; set; }
131131

132132
public bool CreatedInWizard { get; set; }
133+
134+
public bool MovedToExpiredFolder { get; set; }
133135
}

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/PairItemWithSiteHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ await sdkDbContext.FolderTranslations.SingleOrDefaultAsync(x =>
396396

397397
private static async Task<Folder> GetTopFolder(int folderId, MicrotingDbContext dbContext)
398398
{
399-
var result = await dbContext.Folders.FirstOrDefaultAsync(y => y.Id == folderId).ConfigureAwait(false);
399+
var result = await dbContext.Folders.FirstAsync(y => y.Id == folderId).ConfigureAwait(false);
400400
if (result.ParentId != null)
401401
{
402402
result = await GetTopFolder((int)result.ParentId, dbContext).ConfigureAwait(false);

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationPropertiesService/BackendConfigurationPropertiesService.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ public async Task<OperationDataResult<List<PropertyFolderModel>>> GetLinkedFolde
611611
.Where(x => x.Id == propertyId)
612612
.Where(x => x.WorkflowState != Constants.WorkflowStates.Removed)
613613
.Where(x => x.FolderId.HasValue)
614-
.Select(x => x.FolderId.Value)
614+
.Select(x => x.FolderId!.Value)
615615
.ToListAsync();
616616

617617
folderIds.AddRange(await backendConfigurationPnDbContext.ProperyAreaFolders
@@ -655,7 +655,7 @@ public async Task<OperationDataResult<List<PropertyFolderModel>>> GetLinkedFolde
655655
.Where(x => propertyIds.Contains(x.Id))
656656
.Where(x => x.WorkflowState != Constants.WorkflowStates.Removed)
657657
.Where(x => x.FolderId.HasValue)
658-
.Select(x => x.FolderId.Value)
658+
.Select(x => x.FolderId!.Value)
659659
.ToListAsync();
660660

661661
folderIds.AddRange(await backendConfigurationPnDbContext.ProperyAreaFolders
@@ -748,6 +748,12 @@ public async Task<OperationDataResult<List<CommonDictionaryModel>>> GetLinkedSit
748748
//.Where(x => propertyIds.Contains(x.PropertyId))
749749
.Where(x => x.WorkflowState != Constants.WorkflowStates.Removed);
750750

751+
// if propertyIds is null or empty return an empty list
752+
if (propertyIds == null || !propertyIds.Any())
753+
{
754+
return new OperationDataResult<List<CommonDictionaryModel>>(true, new List<CommonDictionaryModel>());
755+
}
756+
751757
if (propertyIds.Any())
752758
{
753759
query = query.Where(x => propertyIds.Contains(x.PropertyId));

eform-client/src/app/plugins/modules/backend-configuration-pn/models/task-tracker/task.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface TaskModel {
2323
weeks: WeekListModel[];
2424
sdkFolderName: string;
2525
createdInWizard: boolean;
26+
movedToExpiredFolder: boolean
2627
}
2728

2829
export interface WeekListModel {

eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ export class TaskTrackerTableComponent implements OnInit, OnChanges {
4848
enabledHeadersNumber: number = 7;
4949
propertyHeaderEnabled: boolean = false;
5050
currentDate: Date = this.setDate(new Date());
51-
// changedate is "2025-10-30 00:00:00"
52-
parsedDate = Date.parse('2025-11-15 00:00:00');
53-
changeDate: Date = new Date(this.parsedDate);
5451

5552
tableHeaders: MtxGridColumn[] = [
5653
{header: this.translateService.stream('Id'), field: 'complianceId', sortProp: {id: 'Id'}, sortable: false},
@@ -77,15 +74,15 @@ export class TaskTrackerTableComponent implements OnInit, OnChanges {
7774
buttons: [ // action buttons for each row
7875
{
7976
// eslint-disable-next-line max-len
80-
iif: (record: TaskModel) => (record.createdInWizard && !record.taskIsExpired) || (record.taskIsExpired && record.createdInWizard && record.deadlineTask < this.changeDate),
77+
iif: (record: TaskModel) => (record.createdInWizard && !record.taskIsExpired) || (record.taskIsExpired && record.createdInWizard && !record.movedToExpiredFolder),
8178
type: 'icon',
8279
icon: 'edit',
8380
tooltip: this.translateService.stream('Edit'),
8481
click: (record: TaskModel) => this.redirectToCompliance(record),
8582
},
8683
{
8784
// eslint-disable-next-line max-len
88-
iif: (record: TaskModel) => record.createdInWizard && record.deadlineTask < this.changeDate,
85+
iif: (record: TaskModel) => record.createdInWizard && !record.movedToExpiredFolder,
8986
type: 'icon',
9087
tooltip: this.translateService.stream('Delete Case'),
9188
icon: 'delete',

0 commit comments

Comments
 (0)