Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First draft of worksteps and intermediate products #24

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sweidlich
Copy link
Contributor

@sweidlich sweidlich commented Nov 7, 2023

Adds worksteps, finishings and intermediate products.

This will allow to determine which worksteps (including finishings) are required for each job.

Zaikio::MissionControl::Jobs::HardcoverBook.worksteps
=> {:case=>[{:ctp_maybe=>[:plate]}, {:printing=>[:sheet_maybe, :roll_maybe]}, {:cutting_maybe=>[:product]}, {:folding_maybe=>[:fold]}, {:lamination_maybe=>[:laminated_sheet]}],
 :content=>[{:ctp_maybe=>[:plate]}, {:printing=>[:sheet_maybe, :roll_maybe]}, {:cutting=>[:product]}, {:folding=>[:fold]}, {:thread_sewing_maybe=>[:book_block]}, {:lamination_maybe=>[:laminated_sheet]}],
 :endpaper=>[{:ctp_maybe=>[:plate]}, {:printing_maybe=>[:sheet_maybe, :roll_maybe]}, {:cutting_maybe=>[:product]}, {:folding_maybe=>[:fold]}, {:lamination_maybe=>[:laminated_sheet]}],
 :jacket=>[{:ctp_maybe=>[:plate]}, {:printing=>[:sheet_maybe, :roll_maybe]}, {:cutting_maybe=>[:product]}, {:folding_maybe=>[:fold]}, {:lamination_maybe=>[:laminated_sheet]}]}

Part of https://github.com/zaikio/zai-worksteps/issues/57

def worksteps
steps ||= {}

@parts.keys.flat_map do |part|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@parts.keys.flat_map do |part|
parts.flat_map do |part|

@@ -7,11 +7,11 @@
require "zaikio/mission_control/base"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we look at adding Zeitwerk at some point? All those requires start to be out of control 🤪

@YannIsCoding YannIsCoding force-pushed the feature/worksteps-and-intermediate-products branch from a939505 to 50ba48c Compare November 13, 2023 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants