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
5ac78689
Commit
5ac78689
authored
Nov 04, 2025
by
Wei Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code update
parent
e71683b7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
231 additions
and
49 deletions
+231
-49
Info.plist
...PluginFramework/QmsPluginFramework.xcframework/Info.plist
+5
-5
QmsPluginFramework
...ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
QmsPluginFramework
...simulator/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
AddIssueAPIClient.h
...Framework/QmsPluginFramework/AddIssue/AddIssueAPIClient.h
+17
-7
AddIssueAPIClient.mm
...ramework/QmsPluginFramework/AddIssue/AddIssueAPIClient.mm
+112
-0
DetailsViewController.h
...ework/QmsPluginFramework/AddIssue/DetailsViewController.h
+4
-4
DetailsViewController.mm
...work/QmsPluginFramework/AddIssue/DetailsViewController.mm
+0
-0
PlanViewController.mm
...amework/QmsPluginFramework/AddIssue/PlanViewController.mm
+37
-23
IssueDetailViewController.mm
...ork/QmsPluginFramework/Issue/IssueDetailViewController.mm
+1
-1
WithdrawSingleIssueViewController.mm
...luginFramework/Issue/WithdrawSingleIssueViewController.mm
+50
-4
Info.plist
ios/QmsPluginFramework.xcframework/Info.plist
+5
-5
QmsPluginFramework
...ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
QmsPluginFramework
...simulator/QmsPluginFramework.framework/QmsPluginFramework
+0
-0
No files found.
framework/QmsPluginFramework/QmsPluginFramework.xcframework/Info.plist
View file @
5ac78689
...
@@ -8,32 +8,32 @@
...
@@ -8,32 +8,32 @@
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
string
>
ios-arm64
_x86_64-simulator
<
/string
>
<
string
>
ios-arm64
<
/string
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
arm64
<
/string
>
<
string
>
arm64
<
/string
>
<
string
>
x86_64
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
string
>
ios
<
/string
>
<
string
>
ios
<
/string
>
<
k
e
y
>
SupportedPlatformVariant
<
/k
e
y
>
<
string
>
simulator
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
string
>
ios-arm64
<
/string
>
<
string
>
ios-arm64
_x86_64-simulator
<
/string
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
arm64
<
/string
>
<
string
>
arm64
<
/string
>
<
string
>
x86_64
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
string
>
ios
<
/string
>
<
string
>
ios
<
/string
>
<
k
e
y
>
SupportedPlatformVariant
<
/k
e
y
>
<
string
>
simulator
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
...
...
framework/QmsPluginFramework/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
View file @
5ac78689
No preview for this file type
framework/QmsPluginFramework/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework
View file @
5ac78689
No preview for this file type
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/AddIssueAPIClient.h
View file @
5ac78689
...
@@ -2,14 +2,24 @@
...
@@ -2,14 +2,24 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
AddIssueAPIClient
:
NSObject
@interface
AddIssueAPIClient
:
NSObject
+
(
void
)
fetchGetUnitPlan
:(
void
(
^
)(
NSDictionary
*
data
,
NSError
*
error
))
completion
;
+
(
void
)
fetchGetUnitPlan
:(
void
(
^
)(
NSDictionary
*
_Nullable
data
,
NSError
*
_Nullable
error
))
completion
;
+
(
void
)
fetchSettingsByLocation
:(
NSString
*
)
locationID
projectID
:(
NSString
*
)
projectID
+
(
void
)
fetchSettingsByLocation
:(
NSString
*
_Nonnull
)
locationID
completion
:(
void
(
^
)(
NSDictionary
*
data
,
NSError
*
error
))
completion
;
projectID
:(
NSString
*
_Nonnull
)
projectID
+
(
void
)
submitAddIssue
:(
NSDictionary
*
)
params
completion
:(
void
(
^
)(
NSDictionary
*
_Nullable
data
,
NSError
*
_Nullable
error
))
completion
;
images
:(
NSArray
<
UIImage
*>
*
)
images
completion
:(
void
(
^
)(
NSDictionary
*
data
,
NSError
*
error
))
completion
;
+
(
void
)
submitAddIssue
:(
NSDictionary
*
_Nonnull
)
params
images
:(
NSArray
<
UIImage
*>
*
_Nullable
)
images
completion
:(
void
(
^
)(
NSDictionary
*
_Nullable
data
,
NSError
*
_Nullable
error
))
completion
;
+
(
void
)
submitUpdateIssue
:(
NSDictionary
*
_Nonnull
)
updateData
images
:(
NSArray
<
UIImage
*>
*
_Nullable
)
images
completion
:(
void
(
^
)(
NSDictionary
*
_Nullable
response
,
NSError
*
_Nullable
error
))
completion
;
@end
@end
NS_ASSUME_NONNULL_END
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/AddIssueAPIClient.mm
View file @
5ac78689
...
@@ -271,4 +271,116 @@
...
@@ -271,4 +271,116 @@
}
}
+ (void)submitUpdateIssue:(NSDictionary *)updateData
images:(NSArray<UIImage *> * _Nullable)images
completion:(void (^)(NSDictionary * _Nullable response, NSError * _Nullable error))completion {
NSString *urlString = @"https://kitadev.commudesk.com/api/owner/issue/addIssue?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImF0aGlyYWh6YWlkaUBjb252ZXAuY29tIiwicGFzc3dvcmQiOiIkMnkkMTAkNU9xYklqMnZ6UHJwckJrcVd5c3I2LmJCc1hVYS9Hd014eUhnL3RhUUhPUkNQcGdmTG8yakciLCJzdWIiOjIxNzAsImlzcyI6Imh0dHBzOi8va2l0YWRldi5jb21tdWRlc2suY29tL2FwaS9vd25lci9hdXRoL3Bhc3N3b3JkbGVzc19sb2dpbiIsImlhdCI6MTc2MDMxNTM1MiwiZXhwIjoyMDc1ODg0ODcyLCJuYmYiOjE3NjAzMTUzNTIsImp0aSI6IktoQmNyQnJEdDVNdDZlWmMifQ.JnxGbZ7hTeoOr6oibIzZMphgyKtTo2Aq9Efx6mrGfFA"; NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.HTTPMethod = @"POST";
// 🧱 Multipart body setup
NSString *boundary = [NSString stringWithFormat:@"Boundary-%@", [[NSUUID UUID] UUIDString]];
[request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]
forHTTPHeaderField:@"Content-Type"];
NSMutableData *body = [NSMutableData data];
// Helper for form fields
void (^appendFormField)(NSString *, NSString *) = ^(NSString *key, NSString *value) {
[body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary]
dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:
@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key]
dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"%@\r\n", value]
dataUsingEncoding:NSUTF8StringEncoding]];
};
// 🔹 Append update fields (all under data[])
for (NSString *key in updateData.allKeys) {
id value = updateData[key];
if ([value isKindOfClass:[NSNumber class]]) value = [(NSNumber *)value stringValue];
if ([value isKindOfClass:[NSString class]]) {
appendFormField([NSString stringWithFormat:@"data[%@]", key], value);
}
}
// 🔹 Always include OS
appendFormField(@"data[os]", @"AND");
// 🔹 Add `information` field (as JSON string)
NSDictionary *info = @{
@"os": @"AND",
@"drawing_plan_id": updateData[@"plan_id"] ?: @"",
@"information": @{
@"OS": @"AND",
@"IMEI": @"AND:2a2f13ff17b1cbb5",
@"OS_VERSION": @"35",
@"MODEL": @"2306EPN60G",
@"APP_VERSION": @"1.22.26"
}
};
NSError *jsonError;
NSData *infoData = [NSJSONSerialization dataWithJSONObject:info options:0 error:&jsonError];
if (!jsonError) {
NSString *infoString = [[NSString alloc] initWithData:infoData encoding:NSUTF8StringEncoding];
appendFormField(@"data[information]", infoString);
}
// 🔹 Append image files
for (int i = 0; i < images.count; i++) {
UIImage *image = images[i];
NSData *imageData = UIImageJPEGRepresentation(image, 0.8);
if (!imageData) continue;
[body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary]
dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:
@"Content-Disposition: form-data; name=\"data[image][%d]\"; filename=\"image%d.jpg\"\r\n", i, i]
dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[@"Content-Type: image/jpeg\r\n\r\n"
dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:imageData];
[body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
}
[body appendData:[[NSString stringWithFormat:@"--%@--\r\n", boundary]
dataUsingEncoding:NSUTF8StringEncoding]];
request.HTTPBody = body;
NSLog(@"📦 [UpdateIssue] Uploading %lu image(s)", (unsigned long)images.count);
// 🔹 Execute request
NSURLSessionDataTask *task = [[NSURLSession sharedSession]
dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"❌ [UpdateIssue] Network error: %@", error);
dispatch_async(dispatch_get_main_queue(), ^{
if (completion) completion(nil, error);
});
return;
}
NSError *jsonErr;
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonErr];
if (jsonErr) {
NSString *raw = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"⚠️ [UpdateIssue] JSON parse error: %@\nRaw: %@", jsonErr, raw);
dispatch_async(dispatch_get_main_queue(), ^{
if (completion) completion(nil, jsonErr);
});
return;
}
NSLog(@"✅ [UpdateIssue] Response: %@", json);
dispatch_async(dispatch_get_main_queue(), ^{
if (completion) completion(json, nil);
});
}];
[task resume];
}
@end
@end
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/DetailsViewController.h
View file @
5ac78689
...
@@ -6,20 +6,20 @@
...
@@ -6,20 +6,20 @@
@interface
AddIssueDetailsViewController
:
UIViewController
@interface
AddIssueDetailsViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
NSString
*
selectedLocationName
;
@property
(
nonatomic
,
strong
)
NSString
*
selectedLocationName
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UIImage
*>
*
uploadedImages
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UIImage
*>
*
uploadedImages
;
@property
(
nonatomic
,
strong
)
NSString
*
planID
;
@property
(
nonatomic
,
strong
)
NSString
*
planID
;
@property
(
nonatomic
,
strong
)
NSString
*
locationID
;
@property
(
nonatomic
,
strong
)
NSString
*
locationID
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
locationData
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
locationData
;
@property
(
nonatomic
,
strong
)
NSString
*
defectMatrix
;
@property
(
nonatomic
,
strong
)
NSString
*
defectMatrix
;
@property
(
nonatomic
,
strong
)
NSString
*
projectCode
;
@property
(
nonatomic
,
strong
)
NSString
*
projectCode
;
@property
(
nonatomic
,
strong
)
NSString
*
projectName
;
@property
(
nonatomic
,
strong
)
NSString
*
projectName
;
@property
(
nonatomic
,
assign
)
CGFloat
planX
;
@property
(
nonatomic
,
assign
)
CGFloat
planX
;
@property
(
nonatomic
,
assign
)
CGFloat
planY
;
@property
(
nonatomic
,
assign
)
CGFloat
planY
;
@property
(
nonatomic
,
strong
)
NSString
*
action
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
issueContent
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
issueFullData
;
@property
(
nonatomic
,
strong
)
NSString
*
locationName
;
-
(
void
)
dismissSelf
;
-
(
void
)
dismissSelf
;
-
(
void
)
handleSubmit
;
-
(
void
)
handleReset
;
-
(
void
)
handleReset
;
@end
@end
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/DetailsViewController.mm
View file @
5ac78689
This diff is collapsed.
Click to expand it.
framework/QmsPluginFramework/QmsPluginFramework/AddIssue/PlanViewController.mm
View file @
5ac78689
...
@@ -43,8 +43,8 @@
...
@@ -43,8 +43,8 @@
[super viewDidLoad];
[super viewDidLoad];
self.view.backgroundColor = UIColor.whiteColor;
self.view.backgroundColor = UIColor.whiteColor;
NSLog(@"PlanViewController loaded");
NSLog(@"PlanViewController loaded");
NSLog(@"🧭 Navigated to PlanScreen with:\n type=%@\n unitID=%@\n unitName=%@\n location= %@ & %@\n
issue_id=%@\n
",
NSLog(@"🧭 Navigated to PlanScreen with:\n type=%@\n unitID=%@\n unitName=%@\n location= %@ & %@\n
issue_id=%@\n action=%@
",
self.type, self.unitID, self.unitName, self.locationName, self.locationId, self.issueContent[@"issue_id"]);
self.type, self.unitID, self.unitName, self.locationName, self.locationId, self.issueContent[@"issue_id"]
, self.action
);
// Create UI elements (but don’t assign final frames yet)
// Create UI elements (but don’t assign final frames yet)
[self createHeader];
[self createHeader];
[self createScrollView];
[self createScrollView];
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
NSLog(@"✅ Raw Unit Plan response received");
NSLog(@"✅ Raw Unit Plan response received");
// Save response to Documents for
inspection
// Save response to Documents for
debugging
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:NSJSONWritingPrettyPrinted error:nil];
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:data options:NSJSONWritingPrettyPrinted error:nil];
NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;
NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;
NSString *filePath = [docsPath stringByAppendingPathComponent:@"getUnitPlan.txt"];
NSString *filePath = [docsPath stringByAppendingPathComponent:@"getUnitPlan.txt"];
...
@@ -100,8 +100,6 @@
...
@@ -100,8 +100,6 @@
return;
return;
}
}
self.unitPlanLocations = mainData.firstObject[@"location"];
self.unitPlanLocations = mainData.firstObject[@"location"];
// Store main plan object
self.unitPlanData = mainData.firstObject;
self.unitPlanData = mainData.firstObject;
self.locations = self.unitPlanData[@"location"];
self.locations = self.unitPlanData[@"location"];
...
@@ -136,31 +134,38 @@
...
@@ -136,31 +134,38 @@
dispatch_async(dispatch_get_main_queue(), ^{
dispatch_async(dispatch_get_main_queue(), ^{
[self displayPlanImage];
[self displayPlanImage];
[self debugPrintAllIssues];
[self debugPrintAllIssues];
// 🧭 Auto-lock logic for edit mode
// 🧭 Auto-lock logic for edit mode
NSString *action = self.passedData[@"action"];
if ([self.action isEqualToString:@"edit_issue"]) {
if ([action isEqualToString:@"edit_issue"]) {
NSLog(@"✏️ Edit mode detected — will auto-select issue location after image loads");
NSLog(@"✏️ Edit mode detected — auto-selecting issue location");
NSString *posX = [NSString stringWithFormat:@"%@", self.issueContent[@"pos_x"] ?: @""];
// Option 1️⃣ — If you have coordinates
NSString *posY = [NSString stringWithFormat:@"%@", self.issueContent[@"pos_y"] ?: @""];
NSString *posX = [NSString stringWithFormat:@"%@", self.passedData[@"issue_content"][@"pos_x"] ?: @""];
NSString *posY = [NSString stringWithFormat:@"%@", self.passedData[@"issue_content"][@"pos_y"] ?: @""];
if (posX.length > 0 && posY.length > 0) {
self.tappedPlanX = [posX floatValue];
self.tappedPlanX = [posX floatValue];
self.tappedPlanY = [posY floatValue];
self.tappedPlanY = [posY floatValue];
[self highlightExistingIssueAtCoordinates:self.tappedPlanX Y:self.tappedPlanY];
}
// Option 2️⃣ — If you prefer locking by location name
NSString *locationName = self.locationName;
NSString *locationName = self.passedData[@"location_name"];
if (locationName.length > 0) {
self.selectedLocation = locationName;
self.selectedLocation = locationName;
[self showAddIssuePopup]; // show popup immediately
// Wait until planImageView has a valid image
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.planImageView.image) {
[self highlightExistingIssueAtCoordinates:self.tappedPlanX Y:self.tappedPlanY];
[self showAddIssuePopup];
} else {
NSLog(@"⚠️ Plan image not ready, retrying highlight...");
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self highlightExistingIssueAtCoordinates:self.tappedPlanX Y:self.tappedPlanY];
[self showAddIssuePopup];
});
}
}
});
}
}
});
});
}];
}];
}
}
- (void)highlightExistingIssueAtCoordinates:(CGFloat)x Y:(CGFloat)y {
- (void)highlightExistingIssueAtCoordinates:(CGFloat)x Y:(CGFloat)y {
NSLog(@"📍 Highlighting existing issue at (%.2f, %.2f)", x, y);
NSLog(@"📍 Highlighting existing issue at (%.2f, %.2f)", x, y);
...
@@ -764,12 +769,18 @@
...
@@ -764,12 +769,18 @@
nextVC.selectedLocationName = self.selectedLocation;
nextVC.selectedLocationName = self.selectedLocation;
nextVC.locationData = mainData;
nextVC.locationData = mainData;
nextVC.defectMatrix = defectMatrix;
nextVC.defectMatrix = defectMatrix;
nextVC.projectCode = self.projectCode;
nextVC.projectCode = self.projectCode
?: @""
;
nextVC.projectName = self.
projec
tName;
nextVC.projectName = self.
uni
tName;
nextVC.planX = self.tappedPlanX;
nextVC.planX = self.tappedPlanX;
nextVC.planY = self.tappedPlanY;
nextVC.planY = self.tappedPlanY;
NSLog(@"📦 Data being brought over:\n planID: %@\n locationID: %@\n selectedLocationName: %@\n defectMatrix: %@\n projectName: %@\n projectCode: %@\n XCoordinates: %f\n YCoordinates: %f\n locationData: %@",
//edit info
nextVC.action = self.action;
nextVC.issueFullData = self.issueFullData;
nextVC.issueContent = self.issueContent;
nextVC.locationName = self.locationName;
NSLog(@"📦 Data being brought over:\n planID: %@\n locationID: %@\n selectedLocationName: %@\n defectMatrix: %@\n projectName: %@\n projectCode: %@\n XCoordinates: %f\n YCoordinates: %f\n locationData: %@\n action: %@\n issueFullData: %@\n issueContent: %@",
nextVC.planID,
nextVC.planID,
nextVC.locationID,
nextVC.locationID,
nextVC.selectedLocationName,
nextVC.selectedLocationName,
...
@@ -778,7 +789,10 @@
...
@@ -778,7 +789,10 @@
nextVC.projectCode,
nextVC.projectCode,
nextVC.planX,
nextVC.planX,
nextVC.planY,
nextVC.planY,
nextVC.locationData);
nextVC.locationData,
nextVC.action,
nextVC.issueFullData,
nextVC.issueContent);
[self presentViewController:nextVC animated:YES completion:nil];
[self presentViewController:nextVC animated:YES completion:nil];
}
}
...
...
framework/QmsPluginFramework/QmsPluginFramework/Issue/IssueDetailViewController.mm
View file @
5ac78689
...
@@ -414,7 +414,7 @@
...
@@ -414,7 +414,7 @@
HistoryViewController *nextVC = [[HistoryViewController alloc] init];
HistoryViewController *nextVC = [[HistoryViewController alloc] init];
nextVC.modalPresentationStyle = UIModalPresentationFullScreen;
nextVC.modalPresentationStyle = UIModalPresentationFullScreen;
nextVC.issueID = self.issueData[@"issue_reference_id"];
nextVC.issueID = self.issueData[@"issue_reference_id"]
?: self.issueData[@"id"] ?: @""
;
nextVC.planID = self.issueData[@"plan_id"];
nextVC.planID = self.issueData[@"plan_id"];
nextVC.status = self.issueData[@"status_external"];
nextVC.status = self.issueData[@"status_external"];
nextVC.unitName = self.issueData[@"plan_unit"];
nextVC.unitName = self.issueData[@"plan_unit"];
...
...
framework/QmsPluginFramework/QmsPluginFramework/Issue/WithdrawSingleIssueViewController.mm
View file @
5ac78689
...
@@ -170,10 +170,28 @@
...
@@ -170,10 +170,28 @@
NSDictionary *appData = data[@"AppData"];
NSDictionary *appData = data[@"AppData"];
if ([appData[@"status"] isEqualToString:@"success"]) {
if ([appData[@"status"] isEqualToString:@"success"]) {
NSLog(@"Issue deleted successfully");
NSLog(@"✅ Issue deleted successfully!");
UIAlertController *successAlert = [UIAlertController alertControllerWithTitle:@"Success"
message:@"Issue deleted successfully."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *ok = [UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
// 🏠 Mimic AddIssue success dismissal logic
UIViewController *presenter = self.presentingViewController;
if (presenter.presentingViewController) {
[presenter.presentingViewController dismissViewControllerAnimated:YES completion:nil];
} else {
[self dismissViewControllerAnimated:YES completion:nil];
}
}];
[successAlert addAction:ok];
[self presentViewController:successAlert animated:YES completion:nil];
} else {
} else {
NSString *message = appData[@"message"] ?: @"Unknown error";
NSString *message = appData[@"message"] ?: @"Unknown error";
NSLog(@"Error Message %@", message);
NSLog(@"⚠️ Error Message %@", message);
[self showAlertWithTitle:@"Delete Failed" message:message];
}
}
}];
}];
}
}
...
@@ -190,12 +208,40 @@
...
@@ -190,12 +208,40 @@
NSDictionary *appData = data[@"AppData"];
NSDictionary *appData = data[@"AppData"];
if ([appData[@"status"] isEqualToString:@"success"]) {
if ([appData[@"status"] isEqualToString:@"success"]) {
NSLog(@"Issue withdrawn successfully");
NSLog(@"✅ Issue deleted successfully!");
UIAlertController *successAlert = [UIAlertController alertControllerWithTitle:@"Success"
message:@"Issue deleted successfully."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *ok = [UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
// 🏠 Mimic AddIssue success dismissal logic
UIViewController *presenter = self.presentingViewController;
if (presenter.presentingViewController) {
[presenter.presentingViewController dismissViewControllerAnimated:YES completion:nil];
} else {
[self dismissViewControllerAnimated:YES completion:nil];
}
}];
[successAlert addAction:ok];
[self presentViewController:successAlert animated:YES completion:nil];
} else {
} else {
NSString *message = appData[@"message"] ?: @"Unknown error";
NSString *message = appData[@"message"] ?: @"Unknown error";
NSLog(@"Error Message %@", message);
NSLog(@"⚠️ Error Message %@", message);
[self showAlertWithTitle:@"Delete Failed" message:message];
}
}
}];
}];
}
}
# pragma mark - helper
- (void)showAlertWithTitle:(NSString *)title message:(NSString *)message {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil];
[alert addAction:ok];
[self presentViewController:alert animated:YES completion:nil];
}
@end
@end
ios/QmsPluginFramework.xcframework/Info.plist
View file @
5ac78689
...
@@ -8,32 +8,32 @@
...
@@ -8,32 +8,32 @@
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
string
>
ios-arm64
_x86_64-simulator
<
/string
>
<
string
>
ios-arm64
<
/string
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
arm64
<
/string
>
<
string
>
arm64
<
/string
>
<
string
>
x86_64
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
string
>
ios
<
/string
>
<
string
>
ios
<
/string
>
<
k
e
y
>
SupportedPlatformVariant
<
/k
e
y
>
<
string
>
simulator
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
k
e
y
>
BinaryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
string
>
QmsPluginFramework.framework/QmsPluginFramework
<
/string
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
k
e
y
>
LibraryIdentifier
<
/k
e
y
>
<
string
>
ios-arm64
<
/string
>
<
string
>
ios-arm64
_x86_64-simulator
<
/string
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
k
e
y
>
LibraryPath
<
/k
e
y
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
string
>
QmsPluginFramework.framework
<
/string
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
k
e
y
>
SupportedArchitectures
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
arm64
<
/string
>
<
string
>
arm64
<
/string
>
<
string
>
x86_64
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
k
e
y
>
SupportedPlatform
<
/k
e
y
>
<
string
>
ios
<
/string
>
<
string
>
ios
<
/string
>
<
k
e
y
>
SupportedPlatformVariant
<
/k
e
y
>
<
string
>
simulator
<
/string
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
...
...
ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
View file @
5ac78689
No preview for this file type
ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework
View file @
5ac78689
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