diff --git a/database/migrations/schema/0003_job_tz_interval.sql b/database/migrations/schema/0003_job_tz_interval.sql new file mode 100644 index 00000000..57094262 --- /dev/null +++ b/database/migrations/schema/0003_job_tz_interval.sql @@ -0,0 +1,7 @@ +alter table job add column tz_start text; +alter table job add column tz_end text; + +---- create above / drop below ---- + +alter table job drop column tz_start; +alter table job drop column tz_end; diff --git a/gitjobs-server/src/db/dashboard/employer.rs b/gitjobs-server/src/db/dashboard/employer.rs index 18ea9042..1d9844a1 100644 --- a/gitjobs-server/src/db/dashboard/employer.rs +++ b/gitjobs-server/src/db/dashboard/employer.rs @@ -168,6 +168,8 @@ impl DBDashBoardEmployer for PgDB { salary_period, seniority, skills, + tz_end, + tz_start, upstream_commitment, published_at ) @@ -192,7 +194,9 @@ impl DBDashBoardEmployer for PgDB { $18::text, $19::text, $20::text[], - $21::int, + $21::text, + $22::text, + $23::int, case when $3::text = 'published' then current_timestamp else null end returning job_id; ", @@ -217,6 +221,8 @@ impl DBDashBoardEmployer for PgDB { &job.salary_period, &job.seniority.as_ref().map(ToString::to_string), &job.skills, + &job.tz_end, + &job.tz_start, &job.upstream_commitment, ], ) @@ -404,6 +410,8 @@ impl DBDashBoardEmployer for PgDB { j.salary_period, j.seniority, j.skills, + j.tz_end, + j.tz_start, j.updated_at, j.upstream_commitment, ( @@ -464,6 +472,8 @@ impl DBDashBoardEmployer for PgDB { .get::<_, Option>("seniority") .map(|s| s.parse().expect("valid seniority")), skills: row.get("skills"), + tz_end: row.get("tz_end"), + tz_start: row.get("tz_start"), updated_at: row.get("updated_at"), upstream_commitment: row.get("upstream_commitment"), }; @@ -677,7 +687,9 @@ impl DBDashBoardEmployer for PgDB { salary_period = $18::text, seniority = $19::text, skills = $20::text[], - upstream_commitment = $21::int, + tz_end = $21::text, + tz_start = $22::text, + upstream_commitment = $23::int, updated_at = current_timestamp where job_id = $1::uuid; ", @@ -702,6 +714,8 @@ impl DBDashBoardEmployer for PgDB { &job.salary_period, &job.seniority.as_ref().map(ToString::to_string), &job.skills, + &job.tz_end, + &job.tz_start, &job.upstream_commitment, ], ) diff --git a/gitjobs-server/src/db/jobboard.rs b/gitjobs-server/src/db/jobboard.rs index d173b9df..4a14b001 100644 --- a/gitjobs-server/src/db/jobboard.rs +++ b/gitjobs-server/src/db/jobboard.rs @@ -85,6 +85,8 @@ impl DBJobBoard for PgDB { j.salary_period, j.seniority, j.skills, + j.tz_end, + j.tz_start, j.updated_at, j.upstream_commitment, ( @@ -168,6 +170,8 @@ impl DBJobBoard for PgDB { .get::<_, Option>("seniority") .map(|s| s.parse().expect("valid seniority")), skills: row.get("skills"), + tz_end: row.get("tz_end"), + tz_start: row.get("tz_start"), updated_at: row.get("updated_at"), upstream_commitment: row.get("upstream_commitment"), }; diff --git a/gitjobs-server/src/templates/dashboard/employer/jobs.rs b/gitjobs-server/src/templates/dashboard/employer/jobs.rs index 7a4c6814..cdce37ad 100644 --- a/gitjobs-server/src/templates/dashboard/employer/jobs.rs +++ b/gitjobs-server/src/templates/dashboard/employer/jobs.rs @@ -89,6 +89,8 @@ pub(crate) struct Job { pub salary_period: Option, pub seniority: Option, pub skills: Option>, + pub tz_end: Option, + pub tz_start: Option, pub updated_at: Option>, pub upstream_commitment: Option, } diff --git a/gitjobs-server/src/templates/jobboard/jobs.rs b/gitjobs-server/src/templates/jobboard/jobs.rs index bdfd8706..01479b61 100644 --- a/gitjobs-server/src/templates/jobboard/jobs.rs +++ b/gitjobs-server/src/templates/jobboard/jobs.rs @@ -217,6 +217,8 @@ pub(crate) struct Job { pub salary_period: Option, pub seniority: Option, pub skills: Option>, + pub tz_end: Option, + pub tz_start: Option, pub updated_at: Option>, pub upstream_commitment: Option, } diff --git a/gitjobs-server/static/styles/index.css b/gitjobs-server/static/styles/index.css index 6c978712..c86fbdde 100644 --- a/gitjobs-server/static/styles/index.css +++ b/gitjobs-server/static/styles/index.css @@ -61,6 +61,14 @@ } /* End markdown */ +select.aligned-right { + text-align-last: right; +} + +select.aligned-right option { + direction: rtl; +} + /* Select styles */ .select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); diff --git a/gitjobs-server/templates/dashboard/employer/jobs/add.html b/gitjobs-server/templates/dashboard/employer/jobs/add.html index c991a180..59989ff7 100644 --- a/gitjobs-server/templates/dashboard/employer/jobs/add.html +++ b/gitjobs-server/templates/dashboard/employer/jobs/add.html @@ -14,7 +14,7 @@
{# Job title #} -
+
@@ -33,9 +33,7 @@
{# End Job title #} - {# Job status #} - - {# End job status #} +
{# Job location #}
@@ -43,9 +41,49 @@

Location of the job.

- {# End Job location #} + {# Timezone range section #} +
+
Timezone
+
+ {# Timezone start #} +
+
+
Start
+ +
+
+ {# End Timezone start #} + + {# Timezone end #} +
+
+
End
+ +
+
+ {# End Timezone end #} +
+ +

Timezone range where you would like your remote applicants to be located at.

+
+ {# End timezone range section #} + {# Job type #}

- Explain potential candidates what will they do at this job and what their responsibilities will be. + Explain to potential candidates what they will do at this job and what their responsibilities will be.

{# End Job responsibilities #} @@ -326,6 +364,10 @@
{# End Open Source #} + {# Job status #} + + {# End job status #} +
{# Preview #}
diff --git a/gitjobs-server/templates/dashboard/employer/jobs/preview.html b/gitjobs-server/templates/dashboard/employer/jobs/preview.html index f3f44b9d..19365c3c 100644 --- a/gitjobs-server/templates/dashboard/employer/jobs/preview.html +++ b/gitjobs-server/templates/dashboard/employer/jobs/preview.html @@ -213,6 +213,18 @@ {% call job_workplace(workplace = job.workplace, location = job.location|display_some_or("-")) %} {# End location #} + {# Timezone #} + {% if let Some(tz_start) = job.tz_start %} + {% call job_details_subheading(content = "Timezone") %} + {% if let Some(tz_end) = job.tz_end %} + {% let timezone = format!("{} - {}", tz_start, tz_end) %} + {% call job_details_content(text = timezone) %} + {% else %} + {% call job_details_content(text = tz_start) %} + {% endif %} + {% endif %} + {# End timezone #} + {# Open source #} {% if let Some(open_source) = job.open_source %} {% if open_source + 0 > 0 %} diff --git a/gitjobs-server/templates/dashboard/employer/jobs/update.html b/gitjobs-server/templates/dashboard/employer/jobs/update.html index e13b1e63..3bdcb0d3 100644 --- a/gitjobs-server/templates/dashboard/employer/jobs/update.html +++ b/gitjobs-server/templates/dashboard/employer/jobs/update.html @@ -16,7 +16,7 @@
{# Job title #} -
+
@@ -36,9 +36,7 @@
{# End Job title #} - {# Job status #} - - {# End job status #} +
{# Job location #}
@@ -52,6 +50,47 @@
{# End Job location #} + {# Timezone range section #} +
+
Timezone
+
+ {# Timezone start #} +
+
+
Start
+ +
+
+ {# End Timezone start #} + + {# Timezone end #} +
+
+
End
+ +
+
+ {# End Timezone end #} +
+ +

Timezone range where you would like your remote applicants to be located at.

+
+ {# End timezone range section #} + {# Job type #}

- Explain potential candidates what will they do at this job and what their responsibilities will be. + Explain to potential candidates what they will do at this job and what their responsibilities will be.

{# End Job responsibilities #} @@ -373,6 +412,10 @@
{# End Open Source #} + {# Job status #} + + {# End job status #} +
{# Preview #}
diff --git a/gitjobs-server/templates/jobboard/jobs/job_section.html b/gitjobs-server/templates/jobboard/jobs/job_section.html index 148eb800..f7b6a4d7 100644 --- a/gitjobs-server/templates/jobboard/jobs/job_section.html +++ b/gitjobs-server/templates/jobboard/jobs/job_section.html @@ -219,6 +219,18 @@ {% call macros_preview::job_workplace(workplace = job.workplace, location = job.location|display_some_or("-")) %} {# End location #} + {# Timezone #} + {% if let Some(tz_start) = job.tz_start %} + {% call macros_preview::job_details_subheading(content = "Timezone") %} + {% if let Some(tz_end) = job.tz_end %} + {% let timezone = format!("{} - {}", tz_start, tz_end) %} + {% call macros_preview::job_details_content(text = timezone) %} + {% else %} + {% call macros_preview::job_details_content(text = tz_start) %} + {% endif %} + {% endif %} + {# End timezone #} + {# Open source #} {% if let Some(open_source) = job.open_source %} {% if open_source + 0 > 0 %}