Remove everything to do with pay and only track miles and hours worked.

This commit is contained in:
zontreck 2025-05-17 00:33:41 -07:00
parent 9b50945e3b
commit ee0fed6d6b
6 changed files with 44 additions and 110 deletions

View file

@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:libacflutter/Constants.dart';
import 'package:libacflutter/Prompt.dart';
import 'package:timetrack/consts.dart';
import 'package:timetrack/data.dart';
@ -151,10 +150,7 @@ class _HomePageState extends State<HomePage> {
Widget GetTripWidgets() {
return Column(
children: [
Text(
"Trip started; Base Pay: \$${SessionData.currentTrip!.BasePay}",
style: TextStyle(fontSize: 18),
),
Text("Trip started", style: TextStyle(fontSize: 18)),
Text(
"To end both your current delivery, and the trip, tap on END TRIP",
style: TextStyle(fontSize: 18),
@ -164,20 +160,6 @@ class _HomePageState extends State<HomePage> {
),
ElevatedButton(
onPressed: () async {
var reply = await showDialog(
context: context,
builder: (bld) {
return InputPrompt(
title: "What was the tip?",
prompt: "If there was no tip, enter a 0, or just hit submit.",
type: InputPromptType.Number,
);
},
);
if (reply == null || reply == "") reply = "0";
double tip = double.parse(reply as String);
SessionData.currentDelivery!.TipAmount = tip;
SessionData.currentDelivery!.MarkEndLocation();
SessionData.EndTrip();
@ -195,21 +177,6 @@ class _HomePageState extends State<HomePage> {
children: [
ElevatedButton(
onPressed: () async {
var reply = await showDialog(
context: context,
builder: (bld) {
return InputPrompt(
title: "What was the tip?",
prompt:
"If there was no tip, enter a 0, or hit submit and leave blank",
type: InputPromptType.Number,
);
},
);
if (reply == null || reply == "") reply = "0";
double tip = double.parse(reply as String);
SessionData.currentDelivery!.TipAmount = tip;
SessionData.currentDelivery!.MarkEndLocation();
SessionData.GetNewDelivery();
@ -226,20 +193,7 @@ class _HomePageState extends State<HomePage> {
children: [
ElevatedButton(
onPressed: () async {
var reply = await showDialog(
context: context,
builder: (builder) {
return InputPrompt(
title: "What is the base pay?",
prompt: "Enter the base pay amount below.",
type: InputPromptType.Number,
);
},
);
if (reply == null || reply == "") reply = "0";
double basePay = double.parse(reply as String);
SessionData.GetNewTrip(basePay: basePay);
SessionData.GetNewTrip();
SessionData.GetNewDelivery();
setState(() {});

View file

@ -67,9 +67,6 @@ class _MapPage extends State<MapPage> {
title: Text(
"Trip #${SessionData.Trips.indexOf(trip) + 1}; DropOff #${trip.deliveries.indexOf(dropOff) + 1}",
),
content: Text(
"Pay: \$${trip.BasePay}\nTip: \$${dropOff.TipAmount}",
),
);
},
);

View file

@ -51,23 +51,7 @@ class _WorkData extends State<WorkDataPage> {
style: TextStyle(fontSize: 18),
),
SizedBox(height: 20),
Text(
"Total Trips: ${SessionData.Trips.length}",
style: TextStyle(fontSize: 18),
),
Text(
"Total Base Pay: \$${SessionData.GetTotalBasePay()}",
style: TextStyle(fontSize: 18),
),
Text(
"Total Tips: \$${SessionData.GetTotalTips()}",
style: TextStyle(fontSize: 18),
),
Text(
"Total Earnings: \$${SessionData.GetTotalPay()}",
style: TextStyle(fontSize: 18),
),
SizedBox(height: 20),
Text(
"Total Estimated Miles: ${SessionData.GetTotalMilesAsString()}\n(Note: The miles displayed above may not be 100% accurate)",
style: TextStyle(fontSize: 24),