Skip to content

Commit 39c3c70

Browse files
committedFeb 26, 2023
Get role description from user (+checking)
1 parent e935d88 commit 39c3c70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎renderer.js

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var goBackButton = null;
77

88
var API_KEY_INFO = null;
99
var COMPANY_NAME = null;
10+
var ROLE_DESCRIPTION = null;
1011
var USER_BACKGROUND = null;
1112
var JOB_POSITION = null;
1213

@@ -69,11 +70,14 @@ async function onClickGoBackButton() {
6970
async function onClickGenerateButton() {
7071
// Prep company & user info
7172
COMPANY_NAME = document.getElementById("company-info").value;
73+
ROLE_DESCRIPTION = document.getElementById("role-description").value;
7274
USER_BACKGROUND = document.getElementById("user-background").value;
7375
JOB_POSITION = document.getElementById("job-position").value;
7476

7577
if (!COMPANY_NAME) {
7678
alert('⚠️ You did not specify the company name! Please write the name of the company.');
79+
} else if (!ROLE_DESCRIPTION) {
80+
alert('⚠️ The role description section is missing! Please tell us more about the role you are applying for.')
7781
} else if (!USER_BACKGROUND) {
7882
alert('⚠️ You forgot to tell me your background! I cannot generate text without knowing who you are. Please write a brief summary of your background.');
7983
} else if (!JOB_POSITION) {

0 commit comments

Comments
 (0)