GithubHelp home page GithubHelp logo

Menghapus kategori about dompet HOT 9 CLOSED

kresnasatya avatar kresnasatya commented on June 3, 2024
Menghapus kategori

from dompet.

Comments (9)

kresnasatya avatar kresnasatya commented on June 3, 2024 1

Oh oke, saya mau coba. :D

from dompet.

nafiesl avatar nafiesl commented on June 3, 2024 1

Terima kasih sebelumnya mas. 🙏

from dompet.

nafiesl avatar nafiesl commented on June 3, 2024 1

mas @satyakresna, issue ini sudah bisa kita closed dengan PR #21 yang sudah merged. 👍

from dompet.

nafiesl avatar nafiesl commented on June 3, 2024

Betul mas, di class Policy nya sudah dibuat seperti itu CategoryPolicy.php#L58-L62. Tujuannya agar transaksi tidak error ketika kategorinya dihapus.

Atau mas @satyakresna ada masukan terkait hal ini?

from dompet.

kresnasatya avatar kresnasatya commented on June 3, 2024

Kalau dari saya saat ini lagi ingin menghapus kategori transaksi Jenius di aplikasinya, hanya saja sudah ada daftar transaksi walaupun hanya sekitar 10 baris. Cuma, saya rada malas kalau hapus satu per satu. Bagaimana kalau kita menghapus sebuah kategori yang sudah ada transaksi tetapi tidak benar" dihapus di database? Alias ada bantuan soft delete.

from dompet.

nafiesl avatar nafiesl commented on June 3, 2024

Bisa sih, cuman mengubah struktur table lagi ya.

Gimana kalau gini: Kita kasih checbox "Hapus bersama transaksinya" saat mau hapus kategori. Secara umum kira-kira begini:

  1. Fitur hapus kategori dibuka (walapun ada transaksi).
  2. Tampil informasi jumlah transaksi pada kategori ini
  3. Checkbox "Hapus semua transaksinya".
  4. Jika checbox dicentang, maka semua transaksinya ikut dihapus.
  5. Jika checbox tidak dicentang, maka semua transaksi diset null pada kolom category_id nya.

How about it, mas?

from dompet.

kresnasatya avatar kresnasatya commented on June 3, 2024

Saya lihat itu ide yang bagus mas. Kita bisa coba ini.

from dompet.

nafiesl avatar nafiesl commented on June 3, 2024

Mau coba contribute dengan PR mas @satyakresna? Hehe..

from dompet.

kresnasatya avatar kresnasatya commented on June 3, 2024

Sip, sama" mas.

from dompet.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.