File tree Expand file tree Collapse file tree 6 files changed +24
-14
lines changed
eFormAPI/Plugins/ItemsPlanning.Pn/ItemsPlanning.Pn
Services/ItemsPlanningTagsService
eform-client/src/app/plugins/modules/items-planning-pn/services Expand file tree Collapse file tree 6 files changed +24
-14
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public ItemsPlanningTagsController(IItemsPlanningTagsService itemsPlanningTagsSe
4646 }
4747
4848 [ HttpGet ]
49- public async Task < OperationDataResult < List < CommonDictionaryModel > > > GetItemsPlanningTags ( )
49+ public async Task < OperationDataResult < List < PlanningTagModel > > > GetItemsPlanningTags ( )
5050 {
5151 return await _itemsPlanningTagsService . GetItemsPlanningTags ( ) ;
5252 }
@@ -77,4 +77,4 @@ public async Task<OperationResult> BulkPlanningTags([FromBody] PlanningBulkTagMo
7777 return await _itemsPlanningTagsService . BulkPlanningTags ( requestModel ) ;
7878 }
7979 }
80- }
80+ }
Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222SOFTWARE.
2323*/
2424
25+ using Microting . eFormApi . BasePn . Infrastructure . Models . Common ;
26+
2527namespace ItemsPlanning . Pn . Infrastructure . Models . Planning
2628{
27- public class PlanningTagModel
29+ public class PlanningTagModel : CommonDictionaryModel
2830 {
29- public int ? Id { get ; set ; }
30- public string Name { get ; set ; }
31+ public bool IsLocked { get ; set ; }
3132 }
32- }
33+ }
Original file line number Diff line number Diff line change 1+ using Microting . eFormApi . BasePn . Infrastructure . Models . Common ;
2+
3+ namespace ItemsPlanning . Pn . Infrastructure . Models ;
4+
5+ public class TagModel : CommonDictionaryModel
6+ {
7+ public bool IsLocked { get ; set ; }
8+ }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ namespace ItemsPlanning.Pn.Services.ItemsPlanningTagsService
3232
3333 public interface IItemsPlanningTagsService
3434 {
35- Task < OperationDataResult < List < CommonDictionaryModel > > > GetItemsPlanningTags ( ) ;
35+ Task < OperationDataResult < List < PlanningTagModel > > > GetItemsPlanningTags ( ) ;
3636
3737 Task < OperationResult > UpdateItemsPlanningTag ( PlanningTagModel requestModel ) ;
3838
@@ -42,4 +42,4 @@ public interface IItemsPlanningTagsService
4242
4343 Task < OperationResult > BulkPlanningTags ( PlanningBulkTagModel requestModel ) ;
4444 }
45- }
45+ }
Original file line number Diff line number Diff line change @@ -48,20 +48,21 @@ public class ItemsPlanningTagsService(
4848 IUserService userService )
4949 : IItemsPlanningTagsService
5050{
51- public async Task < OperationDataResult < List < CommonDictionaryModel > > > GetItemsPlanningTags ( )
51+ public async Task < OperationDataResult < List < PlanningTagModel > > > GetItemsPlanningTags ( )
5252 {
5353 try
5454 {
5555 var itemsPlanningTags = await dbContext . PlanningTags
5656 . Where ( x => x . WorkflowState != Constants . WorkflowStates . Removed )
5757 . AsNoTracking ( )
58- . Select ( x => new CommonDictionaryModel
58+ . Select ( x => new PlanningTagModel
5959 {
6060 Id = x . Id ,
61- Name = x . Name
61+ Name = x . Name ,
62+ IsLocked = x . IsLocked
6263 } ) . OrderBy ( x => x . Name ) . ToListAsync ( ) ;
6364
64- return new OperationDataResult < List < CommonDictionaryModel > > (
65+ return new OperationDataResult < List < PlanningTagModel > > (
6566 true ,
6667 itemsPlanningTags ) ;
6768 }
@@ -70,7 +71,7 @@ public async Task<OperationDataResult<List<CommonDictionaryModel>>> GetItemsPlan
7071 SentrySdk . CaptureException ( e ) ;
7172 logger . LogError ( e . Message ) ;
7273 logger . LogTrace ( e . StackTrace ) ;
73- return new OperationDataResult < List < CommonDictionaryModel > > (
74+ return new OperationDataResult < List < PlanningTagModel > > (
7475 false ,
7576 itemsPlanningLocalizationService . GetString ( "ErrorWhileObtainingItemsPlanningTags" ) ) ;
7677 }
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export let ItemsPlanningTagsMethods = {
2020export class ItemsPlanningPnTagsService {
2121 constructor ( private apiBaseService : ApiBaseService ) { }
2222
23- getPlanningsTags ( ) : Observable < OperationDataResult < CommonDictionaryModel [ ] > > {
23+ getPlanningsTags ( ) : Observable < OperationDataResult < SharedTagModel [ ] > > {
2424 return this . apiBaseService . get < SharedTagModel [ ] > (
2525 ItemsPlanningTagsMethods . Tags
2626 ) ;
You can’t perform that action at this time.
0 commit comments