Added has_many assoziations for creator and cashier to jobs, fixed all views according to that changes. Implemented allocation of roles infos when status changes in job model.
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
class CreateJobs < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
create_table :jobs do |t|
|
||||
t.references :operator, null: true
|
||||
t.references :costumer, null: true
|
||||
t.string :operator_firstname
|
||||
t.string :operator_lastname
|
||||
t.references :creator, null: true
|
||||
t.references :cashier, null: true
|
||||
t.references :operator, null: true
|
||||
t.string :costumer_firstname
|
||||
t.string :costumer_lastname
|
||||
t.boolean :printed, default: false
|
||||
t.boolean :paid, default: false
|
||||
t.string :operator_firstname
|
||||
t.string :operator_lastname
|
||||
t.string :cashier_firstname
|
||||
t.string :cashier_lastname
|
||||
t.datetime :printed_at
|
||||
t.datetime :status_changed_at
|
||||
t.datetime :paid_at
|
||||
t.datetime :status_changed_at
|
||||
t.boolean :intern, default: false
|
||||
t.string :cost_center
|
||||
t.string :status, default: "open", index: true
|
||||
|
||||
Reference in New Issue
Block a user