feat: add trip deletion and adjust CI/CD workflows for luggage-list
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build App
|
||||
name: Luggage List Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -49,13 +49,13 @@ jobs:
|
||||
--profile=preview
|
||||
|
||||
- name: 📝 Rename build to APK
|
||||
run: mv app-build app-release.apk
|
||||
run: mv app-build luggage-list-release.apk
|
||||
|
||||
- name: 📤 Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: android-preview-build
|
||||
path: app-release.apk
|
||||
name: luggage-list-android-preview-build
|
||||
path: luggage-list-release.apk
|
||||
if-no-files-found: error
|
||||
|
||||
build-web:
|
||||
@@ -88,13 +88,13 @@ jobs:
|
||||
run: npx expo export --platform web
|
||||
|
||||
- name: 📦 Zip dist
|
||||
run: cd dist && zip -r ../dist.zip .
|
||||
run: cd dist && zip -r ../luggage-list-dist.zip .
|
||||
|
||||
- name: 📤 Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: web-build
|
||||
path: dist.zip
|
||||
name: luggage-list-web-build
|
||||
path: luggage-list-dist.zip
|
||||
if-no-files-found: error
|
||||
|
||||
release:
|
||||
@@ -107,16 +107,16 @@ jobs:
|
||||
- name: 📥 Download Android artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: android-preview-build
|
||||
name: luggage-list-android-preview-build
|
||||
|
||||
- name: 📥 Download Web artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: web-build
|
||||
name: luggage-list-web-build
|
||||
|
||||
- name: 🏷 Create tag
|
||||
run: |
|
||||
TAG="build-$(git rev-parse --short HEAD)"
|
||||
TAG="luggage-list-build-$(git rev-parse --short HEAD)"
|
||||
git tag "$TAG"
|
||||
git push origin "$TAG"
|
||||
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
|
||||
@@ -127,8 +127,8 @@ jobs:
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
name: ${{ env.RELEASE_TAG }}
|
||||
files: |
|
||||
app-release.apk
|
||||
dist.zip
|
||||
luggage-list-release.apk
|
||||
luggage-list-dist.zip
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Dev Branch Check
|
||||
name: Luggage List Dev Branch Check
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
@@ -24,5 +24,5 @@ jobs:
|
||||
- name: 📦 Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: 🧪 Check for linting/type errors
|
||||
- name: 🧪 Web export smoke check
|
||||
run: npx expo export --platform web
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Manual APK Build
|
||||
name: Luggage List Manual APK Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -47,11 +47,11 @@ jobs:
|
||||
--profile=preview
|
||||
|
||||
- name: 📝 Rename build to APK
|
||||
run: mv app-build time-until-manual.apk
|
||||
run: mv app-build luggage-list-manual.apk
|
||||
|
||||
- name: 📤 Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: manual-apk-build
|
||||
path: time-until-manual.apk
|
||||
name: luggage-list-manual-apk-build
|
||||
path: luggage-list-manual.apk
|
||||
if-no-files-found: error
|
||||
|
||||
38
App.js
38
App.js
@@ -292,6 +292,33 @@ export default function App() {
|
||||
setData((prev) => ({ ...prev, defaultTemplateTripId: tripId }));
|
||||
}
|
||||
|
||||
function deleteTrip(tripId) {
|
||||
Alert.alert('Delete trip?', 'This removes the trip, its items, and its check-up history.', [
|
||||
{ text: 'Cancel', style: 'cancel' },
|
||||
{
|
||||
text: 'Delete',
|
||||
style: 'destructive',
|
||||
onPress: () => {
|
||||
setData((prev) => {
|
||||
const nextTrips = prev.trips.filter((trip) => trip.id !== tripId);
|
||||
const nextItemsByTrip = { ...prev.itemsByTrip };
|
||||
const nextCheckupsByTrip = { ...prev.checkupsByTrip };
|
||||
delete nextItemsByTrip[tripId];
|
||||
delete nextCheckupsByTrip[tripId];
|
||||
|
||||
return {
|
||||
...prev,
|
||||
trips: nextTrips,
|
||||
itemsByTrip: nextItemsByTrip,
|
||||
checkupsByTrip: nextCheckupsByTrip,
|
||||
defaultTemplateTripId: prev.defaultTemplateTripId === tripId ? null : prev.defaultTemplateTripId,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
function saveItem() {
|
||||
if (!selectedTripId) {
|
||||
Alert.alert('No trip', 'Create or select a trip first.');
|
||||
@@ -629,9 +656,14 @@ export default function App() {
|
||||
{data.defaultTemplateTripId === trip.id ? ' • Template' : ''}
|
||||
</Text>
|
||||
</Pressable>
|
||||
<Pressable style={styles.smallActionBtn} onPress={() => setTripAsTemplate(trip.id)}>
|
||||
<Text style={styles.smallActionBtnText}>Template</Text>
|
||||
</Pressable>
|
||||
<View style={styles.itemActionsColumn}>
|
||||
<Pressable style={styles.smallActionBtn} onPress={() => setTripAsTemplate(trip.id)}>
|
||||
<Text style={styles.smallActionBtnText}>Template</Text>
|
||||
</Pressable>
|
||||
<Pressable style={styles.smallActionBtn} onPress={() => deleteTrip(trip.id)}>
|
||||
<Text style={styles.smallActionBtnText}>Delete</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
</Card>
|
||||
|
||||
10
TODO.md
10
TODO.md
@@ -19,6 +19,12 @@
|
||||
- [x] Default luggage list template (copy into new trip)
|
||||
|
||||
## Remaining
|
||||
- [ ] Adjust CI/CD workflow naming and artifact naming for this project
|
||||
- [ ] Validate app builds (web export smoke check)
|
||||
- [x] Adjust CI/CD workflow naming and artifact naming for this project
|
||||
- [x] Validate app builds (web export smoke check)
|
||||
- [ ] Polish README and commit final notes
|
||||
|
||||
## Progress Log
|
||||
- [x] Initial MVP scaffold and all requested core features implemented
|
||||
- [x] Added trip deletion flow and confirmation
|
||||
- [x] Updated Gitea workflows/artifacts naming for Luggage List
|
||||
- [x] Ran local web export smoke checks successfully
|
||||
|
||||
Reference in New Issue
Block a user