Fix output path in overhead allocation ios app
This commit is contained in:
@@ -66,11 +66,14 @@ struct OverheadAllocation: View {
|
|||||||
|
|
||||||
func allocate_overheads() {
|
func allocate_overheads() {
|
||||||
DispatchQueue.global(qos: .userInitiated).async {
|
DispatchQueue.global(qos: .userInitiated).async {
|
||||||
let finalDocument = TempFileDocument(url: tempPath)
|
// Cut off file://
|
||||||
allocate_overheads_from_text_to_file(lines, accounts, allocationStatistics, areas, costCentres, accountType, tempPath.absoluteString, false, show_from)
|
// 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 {
|
DispatchQueue.main.async {
|
||||||
document = finalDocument
|
document = TempFileDocument(url: tempPath)
|
||||||
showExportPicker = true;
|
showExportPicker = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user