Asep Dadan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Coverage Options Source: Adjustment: Buka Modal POCoverage + (CandidateAdjustmentCoverage || AdjustmentCoverage) Buka Modal, Update Data, Klik Back POCoverage + (CandidateAdjustmentCoverage || AdjustmentCoverage) ```ruby= adj = adj_massal.purchase_order_adjustment po = adj.parent adj_item = adj_massal.purchase_order_adjustment_item candidate_adj_massal = Phoenix::PurchaseOrderAdjustmentItemMassal.not_default .where(candidate: true) .where(purchase_order_adjustment_item_id: adj_item.id) .first adj_coverages = (candidate_adj_massal || adj_massal).purchase_order_adjustment_item_massal_coverages po_coverages = po.purchase_order_item_massal_coverages # Simple coverage_options = po_coverages + adj_coverages # Advance po_coverages.each do |cov| adj_covs = adj_coverages.select { |adj| adj.purchase_order_item_massal_coverage_id == cov.id } adj_cov = adj_covs.detect { |adj| adj.shipping_address_id == cov.shipping_address_id } next if adj_cov.present? || cov.quantity_available.zero? new_cov = build_coverage(cov) adj_coverages << new_cov end coverage_options = adj_coverages # Adjustment # Adjustment Item # Adjustment Item Massal (default_scope to hide candidate object) # Adjustment Item Massal Shipping # Adjustment Item Massal Coverage Simulasi 1 tambah alamat, klik next, submit Ori A: 50 (PO) Coverage Option: A: 50 (PO) Adjust Item: A: 50 (PO) B: 60 (Candidate Massal) C: 70 (Candidate Massal) Coverage Option: A: 50 (PO) B: 60 (Candidate Massal) C: 70 (Candidate Massal) Simulasi 2: Tambah alamat, klik next, klik back, hapus alamat, klik next Ori A: 50 (PO) Coverage Option: A: 50 (PO) Adjust Item: A: 50 (PO) B: 60 (Candidate Massal) C: 70 (Candidate Massal) Coverage Option: A: 50 (PO) B: 60 (Candidate Massal) C: 70 (Candidate Massal) Adjust Item: A: 50 (PO) B: 60 (Candidate Massal) Coverage Option: A: 50 (PO) B: 60 (Candidate Massal) Simulasi 3: Ubah qty dari alamat asli, klik next, klik back Ori A: 50 (PO) Coverage Option: A: 50 (PO) Adjust Item: A: 50 (PO) (POIMC) A: 60 (Candidate Massal) (POAIMC) B: 90 (Candidate Massal) (POAIMC) Coverage Option: A: 60 (Candidate Massal) (POAIMC) B: 90 (Candidate Massal) (POAIMC) ``` Readjustment: Buka Modal PO Coverage + Parent Adjustment Coverage + (CandidateAdjustmentCoverage || AdjustmentCoverage) Buka Modal, Update Data, Klik Back PO Coverage + Parent Adjustment Coverage + (CandidateAdjustmentCoverage || AdjustmentCoverage) ====== ====== Coverages: candidate null = jika bukan object PurchaseOrderAdjustmentItemMassalCoverage true = jika PurchaseOrderAdjustmentItemMassalCoverage masih belum di-finalisasi false = jika PurchaseOrderAdjustmentItemMassalCoverage sudah di-finalisasi will_be_deleted User Melihat Adjusted Coverage - Tampilkan PurchaseOrderAdjustmentItemMassalCoverage where candidate=false Sample: A - 100 (ori) {candidate: null} B - 2 (adjusted) {candidate: false} C - 3 (adjusted) {candidate: false} D - 10 (adjusted) {candidate: false, will_be_deleted= true} x Code: - Officer Render Coverage Options -> Exclude coverage will_be_deleted=true - Officer Submit Step 1 -> Flag Obsolete Coverage with will_be_deleted=true - Officer Delete Candidate Data -> Tambah code untuk update will_be_deleted=false User Buka Modal Adjust Item - Hapus PurchaseOrderAdjustmentItemMassalCoverage where candidate=true - Update all PurchaseOrderAdjustmentItemMassalCoverage set will_be_deleted=false - Tampilkan coverage options: (render coverage options) - Original Coverage from PO - Adjustment Coverage from Parent Adjustment if any - Adjustment Coverage Not Default where will_be_deleted=false User klik next First Step (Save Coverage) - Create Coverage with candidate=true - Flag Obsolete Coverage with will_be_deleted=true - Tampilkan coverage options (render coverage options) User reload/close modal/matot - Do nothing User klik submit Last Step (Save Price) - Delete coverage will_be_deleted=true OR candidate=false - status: {candidate, will_be_deleted, active} Luar: where(status: :active) Step 1: where(status: [:active, :candidate]) Submit Next Step 1: status: :active => update(status: :will_be_deleted) Reload ## readjust User Melihat Adjusted Coverage - Tampilkan PurchaseOrderAdjustmentItemMassalCoverage where candidate=false Sample: A - 100 (ori) {candidate: null} B - 2 (adjusted) {candidate: false , will_be_deleted= false} C - 3 (adjusted) {candidate: false , will_be_deleted= false} D - 10 (adjusted) {candidate: false, will_be_deleted= false} Code: - Officer Render Coverage Options -> Exclude coverage will_be_deleted=true - Officer Submit Step 1 -> Flag Obsolete Coverage with will_be_deleted=true - Officer Delete Candidate Data -> Tambah code untuk update will_be_deleted=false User Buka Modal Adjust Item - Hapus PurchaseOrderAdjustmentItemMassalCoverage where candidate=true - Update all PurchaseOrderAdjustmentItemMassalCoverage set will_be_deleted=false - Tampilkan coverage options: (render coverage options) - Original Coverage from PO - Adjustment Coverage from Parent Adjustment if any - Adjustment Coverage Not Default where will_be_deleted=false Sample: A - 100 (ori) {candidate: null} B - 2 (adjusted) {candidate: false , will_be_deleted= false} C - 3 (adjusted) {candidate: false , will_be_deleted= false} D - 10 => 15 (readjust) {candidate: false, will_be_deleted=false} User klik next First Step (Save Coverage) - Create Coverage with candidate=true - Flag Obsolete Coverage with will_be_deleted=true - Tampilkan coverage options (render coverage options) User reload/close modal/matot - Do nothing User klik submit Last Step (Save Price) - Delete coverage will_be_deleted=true OR candidate=false - Adj 1 - client Adj 1a for Supplier + Cov 1a CANDIDATE = false - Ketika readjust (buka modal) - Tampilkan 1b jika ada, atau 1a jika 1b tidak ada. - Ketika click "Selanjutnya" (Step 1) - Find or Create new Cov 1b dengan CANDIDATE = true - cov.find_or_intialize(shipping_address_id, adj_shipping_id) - Jika Step 2 - Submit - Cari yang CANDIDATE false (Cov 1a) dan Hapus - Cov 1b = Find record yang CANDIDATE true - Save params & Update Cov 1b CANDIDATE = false - Jika close, reload, refresh setelah Step 1 - DO NOTHING - Ketika Reset - Create new Cov 1c dari Adj 1 CANDIDATE false --- Adj 1b for Supplier + Cov 1b CANDIDATE = false - Ketika readjust (buka modal) - Find child dari Adj 1 yang CANDIDATE = true (ekspektasinya dapet 1c) - Tampilkan 1c jika ada, atau 1b jika 1c tidak ada. BE memberikan response Cov 1c jika ada, atau Cov 1b - Ketika click "Selanjutnya" (Step 1) - Find or Create new Cov 1c dengan CANDIDATE = true - cov.find_or_intialize(shipping_address_id, adj_shipping_id) - Jika Step 2 - Submit - Cari yang CANDIDATE false (Cov 1b) dan Hapus - Cov 1c = Find record yang CANDIDATE true - Save params & Update Cov 1c CANDIDATE = false - Jika close, reload, refresh setelah Step 1 - DO NOTHING - Ketika Reset - Create new Cov 1d dari Adj 1 CANDIDATE false Setelah Client Propose atau Supplier Pertama kali Buka Adjustment: Adj 1 {source: client, client_status: waiting_approval, partner_status: on_review} Adj 1a {source: supplier, client_status: null, partner_status: candidate} Supplier Buka Modal Adjust Item: Adj 1 {source: client, client_status: waiting_approval, partner_status: on_review} Adj 1a {source: supplier, client_status: null, partner_status: candidate} Supplier tambah alamat baru Adj 1 {source: client, client_status: waiting_approval, partner_status: on_review} Adj 1a {parent: adj1, source: supplier, client_status: null, partner_status: candidate} Adj 1b {parent: adj1, source: supplier, client_status: null, partner_status: candidate} step awal - po ori 1. cikande 100 2. pvj 50 client adjust (propose) 1. cikande 100 2. pvj 55 supplier readjust item => modal step 1 1. cikande 100 2. pvj 60 {id: null} 3. bekasi 50 {id: null} case 1 supplier modal step 2 di reload expected nya menjadi 1. cikande 100 2. pvj 55 {id: 5} case 2 supplier modal step 2 di back expected nya menjadi 1. cikande 100 2. pvj 60 {id: 7, candidate: true, will_be_deleted: false} 3. bekasi 50 {id: 8 , candidate: true, will_be_deleted: false} supplier di step 1 hapus 3. bekasi 50 {id: 8, candidate: true, will_be_deleted: true} di step 1 supplier ternyata menghapus / ubah data ke semula expected nya menjadi 1. cikande 100 2. pvj 60 {id: 7, candidate: true, will_be_deleted: false} 3. bekasi 50 {id: 8, candidate: true, will_be_deleted: true} next ke step 1 submit - Delete coverage will_be_deleted=true OR candidate=false existing data yg sudah ke save 3. bekasi 50 {candidate: false, will_be_deleted: true} ====== 8 Juli 2022 ====== ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully