Archived
Merge branch 'main' of github.com:GRZ4NA/city-tracker into main
This commit is contained in:
commit
9123ed86af
15 files changed
+326
-10
No files matched your search
@@ -35,6 +35,12 @@ const initialState: IssueState = {
|
||||
photos: [],
|
||||
status: 'new',
|
||||
type: 'problem',
|
||||
solution: {
|
||||
comments: [],
|
||||
createdAt: new Date(),
|
||||
description: "eoooo",
|
||||
title: "title"
|
||||
},
|
||||
comments: [],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { createFeatureSelector, createSelector } from '@ngrx/store';
|
||||
import { IssueState } from '../state/issue.state';
|
||||
import { SolutionModel } from 'src/app/models/solution.model';
|
||||
import { IssueModel } from 'src/app/models/issue.model';
|
||||
|
||||
const selectIssueFeatureState = createFeatureSelector<IssueState>('issueState');
|
||||
|
||||
@@ -12,3 +14,5 @@ export const selectIssue = (id: string) =>
|
||||
createSelector(selectAllIssues, (issues) =>
|
||||
issues.find((issue) => issue.id === id)
|
||||
);
|
||||
|
||||
export const selectAllSolutions = createSelector<any, IssueModel[], SolutionModel[]>(selectAllIssues, issues => issues.map(issue => issue.solution).filter(solution => solution !== undefined) as SolutionModel[])
|
||||
Reference in new issue
Block a user