Use a new endpoint to get conflicting schedules based on a desired blockout
BlockoutDeclineExistingPlansPickerController
- Takes an array of ScheduleIDs
- Gets schedules from core data, and groups them by plan
- Displays each group with buttons to decline/ignore
- PCOScheduleGroup : NSObject lives in PCOCocoa
- ScheduleGroup : PCOScheduleGroup lives in Services
ScheduleGroupDataProvider
: Finds, groups, and sorts schedules based on predicate and planID.
JSON Mapping with PCOManagedObject? (Core Data)- Manual JSON mapping to a NSObject? (in Memory)
- Where should new object live? PCOCocoa or
Services? - Do I need a data provider? I think no, because I'm building a static list/group based on API response.
-
Stop calling
+ (void)getSchedulesForPerson:(PCOObjectID *)personID inDateRangeWithStart:(NSDate *)startDate endDate:(NSDate *)endDate completion:(void(^)(NSSet<NSManagedObjectID *> *_Nullable scheduleIDs, NSError *_Nullable))completion;
inPCOAPIBlockoutsController
-
Add
+ (void)getScheduleConflictsForBlockout:(PCOBlockout *)blockout completion:(void(^)(NSArray <PCOBlockoutScheduleConflictGroup> * _Nullable conflictGroups, NSError * _Nullable error))completion
toPCOAPIBlockoutsController
-
JSON Mapping of new objects
-
Update
BlockoutEditViewControler
to use new API endpoint and pass new conflict groups -
Create a new type of object
BlockoutScheduleConflict
andBlockoutScheduleConflictGroup
-
Add
PCOBlockoutScheduleConflict
object to PCOCocoa orServices? -
Update
BlockoutDeclineExistingPlansPickerController
to useNSArray <BlockoutScheduleConfclit \*>\*
data instead of Schedule group -
Update
BlockoutConflictCell
to useBlockoutScheduleConflictGroup
instead ofScheduleGroup
-
Update
BlockoutConflictCellDelegate
to useBlockoutScheduleConflictGroup
instead ofScheduleGroup
-
Add
declineScheduleConflict:BlockoutScheduleConflict
toPCOAPIScheduleController
- dates
- orgName
- personAvatarURL
- personName
- personID
- serviceTypeName
- shortDates
- status
- teamName
- teamPositionName
- displayDate
- serviceTypeName
- scheduleConflicts
- height for card view
- Array of BlockoutScheduleConflict objects
- initWithBlockoutScheduleConflicts:(NSArray<BlockoutScheduleConflict *> *)scheduleConflicts NS_DESIGNATED_INITIALIZER