mailto: links in the FAQ + Webhook notifications for immediately published offers #45

Merged
ldr merged 2 commits from separate-footer into main 2024-01-02 17:52:54 +01:00
7 changed files with 32 additions and 8 deletions

6
Cargo.lock generated
View file

@ -739,7 +739,7 @@ checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
[[package]]
name = "better_toml_datetime"
version = "0.4.0"
version = "0.4.1"
dependencies = [
"serde",
"thiserror",
@ -1685,7 +1685,7 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "jobboerse"
version = "0.4.0"
version = "0.4.1"
dependencies = [
"actix-files",
"actix-multipart",
@ -1919,7 +1919,7 @@ dependencies = [
[[package]]
name = "multipart_helper"
version = "0.4.0"
version = "0.4.1"
dependencies = [
"actix-multipart",
"futures-util",

View file

@ -2,7 +2,7 @@
members = [".", "packages/*"]
[workspace.package]
version = "0.4.0"
version = "0.4.1"
edition = "2021"
rust-version = "1.64"
license = "MIT OR Apache-2.0"

View file

@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.4.1] (2024-01-02)
### Fix
- change e-mail links in the FAQ to `mailto:` links
- update the version number in the `PKGBUILD` script
- Also send webhook notifications for pre-confirmed pre-reviewed job offers
## [0.4.0] (2023-12-25)
### Added
@ -210,6 +218,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Overview Page of Dependency licenses
[Unreleased]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/main
[0.4.1]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.4.1
[0.4.0]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.4.0
[0.3.0]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.3.0
[0.2.4]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.2.4
[0.2.3]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.2.3

2
dist/arch/PKGBUILD vendored
View file

@ -9,7 +9,7 @@ _reponame=Jobboerse
_pkgname="${_reponame,,}"
_features=()
pkgname="${_reponame,,}"
pkgver=0.3.0
pkgver=0.4.1
pkgrel=1
pkgdesc="FS-InfMath Job-Offer Page"
arch=('x86_64') # Other architectures may work

BIN
packages/jobboerse/THIRDPARTY.toml (Stored with Git LFS)

Binary file not shown.

View file

@ -29,6 +29,7 @@ use crate::route::job_offer::error::{FormProcessingError, SubmissionResponseErro
use crate::route::{HTML_CONTENT, LOGIN_ROUTE};
use crate::server_config::ServerConfig;
use crate::util::{parse_date, parse_datetime, process_links, process_new_attachments};
use crate::webhook::NewOfferWebhookData;
use crate::{email, template};
use multipart_helper::{multi_field, multi_file, once_field};
@ -276,6 +277,19 @@ pub(crate) async fn create_job_offer<'data, 'config>(
}
}
if created_offer.is_published() {
if let Some(webhook_url) = &config.config.webhook_url {
let data = NewOfferWebhookData {
title: created_offer.title.to_owned(),
company: created_offer.offering_party.to_owned(),
link: created_offer.highlight_link(&req)?,
};
crate::webhook::send_new_offer_message(&hb, webhook_url.to_owned(), &data)
.await
.ok();
}
}
Ok(created_offer)
}

View file

@ -8,7 +8,7 @@
<p>Die Aktuellen Semester- und Prüfungszeiträume sollten Sie <a href="https://www.uni-kiel.de/gf-praesidium/de/termine/semesterzeiten">hier</a> finden.</p>
<p class="italic-text">Bei technischen Problemen oder wenn Sie das Formular nicht nutzen können bzw. dürfen, senden Sie bitte eine E-Mail an <a href="{{mail}}">{{mail}}</a>. Wir helfen Ihnen gerne!</p>
<p class="italic-text">Bei technischen Problemen oder wenn Sie das Formular nicht nutzen können bzw. dürfen, senden Sie bitte eine E-Mail an <a href="mailto:{{mail}}">{{mail}}</a>. Wir helfen Ihnen gerne!</p>
</div>
<div>
@ -16,7 +16,7 @@
<p>Einreichungen werden automatisch entfernt, sobald das jeweilige Ablaufdatum verstrichen ist</p>
<p>Einreichungen ohne explizit angegebenes Ablaufdatum haben ein implizites Ablaufdatum 6 Monate (180 Tage) nach Einreichung.</p>
{{#if mail}}
<p>Um eine Einreichung früher zu entfernen, informieren Sie uns bitte per E-Mail unter <a href="{{mail}}">{{mail}}</a>.</p>
<p>Um eine Einreichung früher zu entfernen, informieren Sie uns bitte per E-Mail unter <a href="mailto:{{mail}}">{{mail}}</a>.</p>
{{/if}}
</div>