From 7bf01c87b4a9ae7a4120e2ea850177038abc8726 Mon Sep 17 00:00:00 2001 From: Adhiyotvel Date: Thu, 21 May 2026 11:07:02 +0530 Subject: [PATCH 1/7] fix: update toast alert --- .github/workflows/ci.yml | 49 +++++++++++++++ mobile/package.json | 2 +- mobile/src/App.vue | 29 ++++----- mobile/src/components/Camera.vue | 10 ++- mobile/src/composables/index.js | 10 +-- mobile/src/pages/AllocateEmployees.vue | 84 ++++++++++++++------------ mobile/src/pages/EditInstructions.vue | 16 +---- mobile/src/pages/TimesheetEntry.vue | 16 +---- mobile/src/pages/WorkITEntries.vue | 2 +- 9 files changed, 124 insertions(+), 94 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1b53dd8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-frontend: + name: Build Mobile Frontend + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: yarn + cache-dependency-path: mobile/yarn.lock + + - name: Install dependencies + run: cd mobile && yarn install --frozen-lockfile + + - name: Build + run: cd mobile && yarn build + + lint-python: + name: Lint Python + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install ruff + run: pip install ruff==0.8.1 + + - name: Lint + run: ruff check projectit/ + + - name: Format check + run: ruff format --check projectit/ diff --git a/mobile/package.json b/mobile/package.json index 70fb80c..5e8e325 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -14,7 +14,7 @@ "dayjs": "^1.11.13", "feather-icons": "^4.29.2", "firebase": "^11.4.0", - "frappe-ui": "^0.1.72", + "frappe-ui": "0.1.72", "vite-plugin-pwa": "^0.21.1", "vue": "^3.5.12", "vue-router": "^4.4.5", diff --git a/mobile/src/App.vue b/mobile/src/App.vue index 01d657b..1e00e9b 100644 --- a/mobile/src/App.vue +++ b/mobile/src/App.vue @@ -1,23 +1,24 @@ diff --git a/mobile/src/composables/index.js b/mobile/src/composables/index.js index 661c015..f442a25 100644 --- a/mobile/src/composables/index.js +++ b/mobile/src/composables/index.js @@ -19,15 +19,7 @@ export class FileAttachment { url: 'projectit.api.upload_base64_file', onSuccess: (fileDoc) => resolve(fileDoc), onError: (error) => { - toast({ - title: 'Error', - text: `File upload failed for ${this.fileName}. ${ - error.messages?.[0] || '' - }`, - icon: 'alert-circle', - position: 'bottom-center', - iconClasses: 'text-red-500', - }) + toast.error(`File upload failed for ${this.fileName}. ${error.messages?.[0] || ''}`) reject(error) }, }) diff --git a/mobile/src/pages/AllocateEmployees.vue b/mobile/src/pages/AllocateEmployees.vue index ce55ab8..8355743 100644 --- a/mobile/src/pages/AllocateEmployees.vue +++ b/mobile/src/pages/AllocateEmployees.vue @@ -3,10 +3,15 @@

{{ route.params.project_name }}

-
+
- +
@@ -20,17 +25,27 @@
- +
  • -
    +

    {{ e.employee_name }}

    - +
  • @@ -38,25 +53,28 @@
- + actions: [ + { + label: 'Confirm', + variant: 'solid', + onClick: () => { + employeeInstructionListResource.delete.submit(employeeInstructionId) + showRemove = false + }, + }, + ], + }" + v-model="showRemove" + />