Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weihan-plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wei Han
weihan-plugin
Commits
2ac4e245
Commit
2ac4e245
authored
Oct 14, 2025
by
Wei Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI code update
parent
db23c5fb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
196 additions
and
4 deletions
+196
-4
QmsPluginFramework
...ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
QmsPluginFramework
...simulator/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
DetailsViewController.h
...ework/QmsPluginFramework/AddIssue/DetailsViewController.h
+3
-0
DetailsViewController.mm
...work/QmsPluginFramework/AddIssue/DetailsViewController.mm
+0
-0
PlanViewController.mm
...amework/QmsPluginFramework/AddIssue/PlanViewController.mm
+110
-4
DashboardAPIClient.h
...amework/QmsPluginFramework/Dashboard/DashboardAPIClient.h
+12
-0
DashboardAPIClient.mm
...mework/QmsPluginFramework/Dashboard/DashboardAPIClient.mm
+70
-0
DashboardHeaderView.mm
...ework/QmsPluginFramework/Dashboard/DashboardHeaderView.mm
+1
-0
DashboardViewController.mm
...k/QmsPluginFramework/Dashboard/DashboardViewController.mm
+0
-0
QmsPluginFramework
...ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
QmsPluginFramework
...simulator/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
No files found.
framework/QmsPluginFramework/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
View file @
2ac4e245
No preview for this file type
framework/QmsPluginFramework/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework
View file @
2ac4e245
No preview for this file type
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/DetailsViewController.h
View file @
2ac4e245
...
...
@@ -4,4 +4,7 @@
#import <UIKit/UIKit.h>
@interface
AddIssueDetailsViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
NSString
*
selectedLocationName
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UIImage
*>
*
uploadedImages
;
@end
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/DetailsViewController.mm
View file @
2ac4e245
This diff is collapsed.
Click to expand it.
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/PlanViewController.mm
View file @
2ac4e245
...
...
@@ -12,6 +12,8 @@
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) UIImageView *planImageView;
@property (nonatomic, strong) NSString *selectedLocation;
@end
@implementation PlanViewController
...
...
@@ -170,11 +172,115 @@
}
- (void)handleNextScreen {
NSLog(@"➡️ Test button tapped — navigating to AddIssueDetailsViewController");
[self showAddIssuePopup];
}
- (void)showAddIssuePopup {
NSLog(@"🟢 Showing Add Issue popup");
// Background dim view
UIView *overlay = [[UIView alloc] initWithFrame:self.view.bounds];
overlay.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
overlay.alpha = 0.0;
overlay.tag = 999; // so we can find and remove it later
[self.view addSubview:overlay];
// Popup container
CGFloat safeBottom = self.view.safeAreaInsets.bottom;
CGFloat popupHeight = 180 + safeBottom;
UIView *popup = [[UIView alloc] initWithFrame:CGRectMake(0,
self.view.bounds.size.height,
self.view.bounds.size.width,
popupHeight)];
popup.backgroundColor = UIColor.whiteColor;
popup.layer.cornerRadius = 16;
popup.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
popup.clipsToBounds = YES;
popup.tag = 1000;
[self.view addSubview:popup];
// Label — “You have selected”
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, popup.bounds.size.width - 40, 20)];
label.text = @"You have selected:";
label.textColor = [UIColor blackColor];
label.font = [UIFont systemFontOfSize:15 weight:UIFontWeightRegular];
[popup addSubview:label];
// Mock location name
UILabel *locationLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 50, popup.bounds.size.width - 40, 24)];
locationLabel.text = @"Building A - 2nd Floor";
self.selectedLocation = locationLabel.text;
locationLabel.textColor = [UIColor blackColor];
locationLabel.font = [UIFont boldSystemFontOfSize:17];
[popup addSubview:locationLabel];
// Buttons row
CGFloat buttonWidth = (self.view.bounds.size.width - 48) / 2;
CGFloat buttonY = popupHeight - 60 - safeBottom; // ✅ push up above safe area
UIButton *reselectButton = [UIButton buttonWithType:UIButtonTypeSystem];
reselectButton.frame = CGRectMake(16, buttonY, buttonWidth, 44);
[reselectButton setTitle:@"Reselect" forState:UIControlStateNormal];
[reselectButton setTitleColor:[UIColor colorWithRed:0/255.0 green:109/255.0 blue:141/255.0 alpha:1]
forState:UIControlStateNormal];
reselectButton.layer.borderWidth = 1.0;
reselectButton.layer.borderColor = [UIColor colorWithRed:0/255.0 green:109/255.0 blue:141/255.0 alpha:1].CGColor;
reselectButton.layer.cornerRadius = 8;
[reselectButton addTarget:self action:@selector(dismissAddIssuePopup)
forControlEvents:UIControlEventTouchUpInside];
[popup addSubview:reselectButton];
UIButton *nextButton = [UIButton buttonWithType:UIButtonTypeSystem];
nextButton.frame = CGRectMake(32 + buttonWidth, buttonY, buttonWidth, 44);
[nextButton setTitle:@"Next" forState:UIControlStateNormal];
[nextButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
nextButton.backgroundColor = [UIColor colorWithRed:0/255.0 green:109/255.0 blue:141/255.0 alpha:1];
nextButton.layer.cornerRadius = 8;
[nextButton addTarget:self action:@selector(handleConfirmAddIssue)
forControlEvents:UIControlEventTouchUpInside];
[popup addSubview:nextButton];
// Animate in
[UIView animateWithDuration:0.3 animations:^{
overlay.alpha = 1.0;
popup.frame = CGRectMake(0,
self.view.bounds.size.height - popupHeight,
self.view.bounds.size.width,
popupHeight);
}];
}
- (void)dismissAddIssuePopup {
NSLog(@"❌ Dismissing Add Issue popup");
UIView *overlay = [self.view viewWithTag:999];
UIView *popup = [self.view viewWithTag:1000];
[UIView animateWithDuration:0.25 animations:^{
overlay.alpha = 0.0;
popup.frame = CGRectMake(0,
self.view.bounds.size.height,
popup.bounds.size.width,
popup.bounds.size.height);
} completion:^(BOOL finished) {
[overlay removeFromSuperview];
[popup removeFromSuperview];
}];
}
- (void)handleConfirmAddIssue {
NSLog(@"✅ Confirm Add Issue pressed");
// Dismiss popup first
[self dismissAddIssuePopup];
AddIssueDetailsViewController *nextVC = [[AddIssueDetailsViewController alloc] init];
nextVC.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:nextVC animated:YES completion:nil];
// Then open AddIssueDetailsViewController after a short delay
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
AddIssueDetailsViewController *nextVC = [[AddIssueDetailsViewController alloc] init];
nextVC.selectedLocationName = self.selectedLocation; // ✅ Pass it here
nextVC.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:nextVC animated:YES completion:nil];
});
}
#pragma mark - Actions
...
...
framework/QmsPluginFramework/QmsPluginFramework/Dashboard/DashboardAPIClient.h
0 → 100644
View file @
2ac4e245
// DashboardAPIClient.h
#import <Foundation/Foundation.h>
@interface
DashboardAPIClient
:
NSObject
+
(
void
)
fetchDashboardSummary
:(
void
(
^
)(
NSDictionary
*
data
))
completion
;
+
(
void
)
fetchAnnouncements
:(
void
(
^
)(
NSArray
*
data
))
completion
;
+
(
void
)
fetchAppointments
:(
void
(
^
)(
NSArray
*
data
))
completion
;
+
(
void
)
fetchIssues
:(
void
(
^
)(
NSArray
*
data
))
completion
;
+
(
void
)
fetchHeaderInfo
:(
void
(
^
)(
NSDictionary
*
data
))
completion
;
@end
framework/QmsPluginFramework/QmsPluginFramework/Dashboard/DashboardAPIClient.mm
0 → 100644
View file @
2ac4e245
// DashbaordAPIClient.mm
#import "DashboardAPIClient.h"
@implementation DashboardAPIClient
+ (void)fetchDashboardSummary:(void (^)(NSDictionary *))completion {
NSURL *url = [NSURL URLWithString:@"https://jsonplaceholder.typicode.com/users/1"];
[[[NSURLSession sharedSession] dataTaskWithURL:url
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) { completion(nil); return; }
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
dispatch_async(dispatch_get_main_queue(), ^{
completion(json);
});
}] resume];
}
+ (void)fetchAnnouncements:(void (^)(NSArray *))completion {
NSURL *url = [NSURL URLWithString:@"https://jsonplaceholder.typicode.com/posts?_limit=5"];
[[[NSURLSession sharedSession] dataTaskWithURL:url
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) { completion(nil); return; }
NSArray *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
dispatch_async(dispatch_get_main_queue(), ^{
completion(json);
});
}] resume];
}
+ (void)fetchAppointments:(void (^)(NSArray *))completion {
NSURL *url = [NSURL URLWithString:@"https://jsonplaceholder.typicode.com/todos?_limit=5"];
[[[NSURLSession sharedSession] dataTaskWithURL:url
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) { completion(nil); return; }
NSArray *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
dispatch_async(dispatch_get_main_queue(), ^{
completion(json);
});
}] resume];
}
+ (void)fetchIssues:(void (^)(NSArray *))completion {
NSURL *url = [NSURL URLWithString:@"https://jsonplaceholder.typicode.com/comments?_limit=5"];
[[[NSURLSession sharedSession] dataTaskWithURL:url
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) { completion(nil); return; }
NSArray *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
dispatch_async(dispatch_get_main_queue(), ^{
completion(json);
});
}] resume];
}
+ (void)fetchHeaderInfo:(void (^)(NSDictionary *data))completion {
NSURL *url = [NSURL URLWithString:@"https://jsonplaceholder.typicode.com/photos/1"];
NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithURL:url
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"❌ Header info fetch failed: %@", error);
if (completion) completion(@{});
return;
}
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
if (completion) completion(json);
}];
[task resume];
}
@end
framework/QmsPluginFramework/QmsPluginFramework/Dashboard/DashboardHeaderView.mm
View file @
2ac4e245
//DashboardHeaderView.mm
#import "DashboardHeaderView.h"
@implementation DashboardHeaderView
...
...
framework/QmsPluginFramework/QmsPluginFramework/Dashboard/DashboardViewController.mm
View file @
2ac4e245
This diff is collapsed.
Click to expand it.
ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
View file @
2ac4e245
No preview for this file type
ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework
View file @
2ac4e245
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment