Fix output path in overhead allocation ios app
This commit is contained in:
@@ -66,11 +66,14 @@ struct OverheadAllocation: View {
|
||||
|
||||
func allocate_overheads() {
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
let finalDocument = TempFileDocument(url: tempPath)
|
||||
allocate_overheads_from_text_to_file(lines, accounts, allocationStatistics, areas, costCentres, accountType, tempPath.absoluteString, false, show_from)
|
||||
// Cut off file://
|
||||
// TODO: There has to be a better way to do string slicing right?
|
||||
let tempPathString = String(tempPath.absoluteString.dropFirst(7))
|
||||
|
||||
allocate_overheads_from_text_to_file(lines, accounts, allocationStatistics, areas, costCentres, accountType, tempPathString, false, show_from)
|
||||
|
||||
DispatchQueue.main.async {
|
||||
document = finalDocument
|
||||
document = TempFileDocument(url: tempPath)
|
||||
showExportPicker = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user