Skip to content

Commit c1d1136

Browse files
authored
Move ApplicationForm previews to subfolder (#68)
1 parent 1fd6cda commit c1d1136

4 files changed

Lines changed: 67 additions & 63 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module Flex
2+
module ApplicationForms
3+
class IndexPreview < Lookbook::Preview
4+
def empty
5+
render template: "flex/application_forms/index", locals: {
6+
title: "My Applications",
7+
intro: "Start a new application or continue an existing one.",
8+
new_button_text: "Start New Application",
9+
new_path: "new",
10+
in_progress_applications_heading: "Your Applications",
11+
application_forms: []
12+
}
13+
end
14+
15+
def with_applications
16+
render template: "flex/application_forms/index", locals: {
17+
title: "My Applications",
18+
intro: "Start a new application or continue an existing one.",
19+
new_button_text: "Start New Application",
20+
new_path: "new",
21+
in_progress_applications_heading: "Your Applications",
22+
application_forms: [
23+
{
24+
created_at: "2024-01-15",
25+
path: "/applications/1",
26+
status: :in_progress
27+
},
28+
{
29+
created_at: "2024-01-10",
30+
path: "/applications/2",
31+
status: :submitted
32+
}
33+
]
34+
}
35+
end
36+
end
37+
end
38+
end
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module Flex
2+
module ApplicationForms
3+
class ShowPreview < Lookbook::Preview
4+
def in_progress
5+
render template: "flex/application_forms/show", locals: {
6+
title: "My Application",
7+
back_link_text: "Back to Applications",
8+
index_path: "/applications",
9+
created_at: "2024-01-15",
10+
current_status: :in_progress,
11+
next_step: "Please complete all required fields.",
12+
submitted_on_text: "Started on"
13+
}
14+
end
15+
16+
def submitted
17+
render template: "flex/application_forms/show", locals: {
18+
title: "My Application",
19+
back_link_text: "Back to Applications",
20+
index_path: "/applications",
21+
created_at: "2024-01-10",
22+
current_status: :submitted,
23+
next_step: "Your application is under review.",
24+
submitted_on_text: "Submitted on"
25+
}
26+
end
27+
end
28+
end
29+
end

app/previews/flex/application_forms_index_preview.rb

Lines changed: 0 additions & 36 deletions
This file was deleted.

app/previews/flex/application_forms_show_preview.rb

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)