@@ -39,10 +39,16 @@ function VSpace({ children }) {
39
39
) ;
40
40
}
41
41
42
- export type Type = "problem" | "question" | "task" | "purchase" ;
42
+ export type Type = "problem" | "question" | "task" | "purchase" | "chat" ;
43
43
44
44
function stringToType ( s ?: any ) : Type {
45
- if ( s == "problem" || s == "question" || s == "task" || s == "purchase" )
45
+ if (
46
+ s == "problem" ||
47
+ s == "question" ||
48
+ s == "task" ||
49
+ s == "purchase" ||
50
+ s == "chat"
51
+ )
46
52
return s ;
47
53
return "problem" ; // default;
48
54
}
@@ -224,41 +230,55 @@ export default function Create() {
224
230
< Type type = "purchase" /> I have a question regarding
225
231
purchasing a product.
226
232
</ Radio >
233
+ < Radio value = { "chat" } >
234
+ < Type type = "chat" /> I would like to schedule a video chat.
235
+ </ Radio >
227
236
</ VSpace >
228
237
</ Radio . Group >
229
238
< br />
230
- { showExtra && type !== "purchase" && (
239
+ { showExtra && type !== "purchase" && type != "chat" && (
231
240
< >
232
241
< Files onChange = { setFiles } />
233
242
< br />
234
243
</ >
235
244
) }
236
- < b >
237
- < Status
238
- done = { body && body . length >= MIN_BODY_LENGTH && hasRequired }
239
- /> { " " }
240
- Description
241
- </ b >
242
- < div
243
- style = { {
244
- marginLeft : "30px" ,
245
- borderLeft : "1px solid lightgrey" ,
246
- paddingLeft : "15px" ,
247
- } }
248
- >
249
- { type == "problem" && < Problem onChange = { setBody } /> }
250
- { type == "question" && (
251
- < Question onChange = { setBody } defaultValue = { body } />
252
- ) }
253
- { type == "purchase" && (
254
- < Purchase
255
- onChange = { setBody }
256
- defaultValue = { body }
257
- showExtra = { showExtra }
258
- />
259
- ) }
260
- { type == "task" && < Task onChange = { setBody } /> }
261
- </ div >
245
+ { type == "chat" && (
246
+ < h1 style = { { textAlign : "center" } } >
247
+ < b >
248
+ < A href = "https://calendly.com/cocalc" > Book a Video Chat...</ A >
249
+ </ b >
250
+ </ h1 >
251
+ ) }
252
+ { type != "chat" && (
253
+ < >
254
+ < b >
255
+ < Status
256
+ done = { body && body . length >= MIN_BODY_LENGTH && hasRequired }
257
+ /> { " " }
258
+ Description
259
+ </ b >
260
+ < div
261
+ style = { {
262
+ marginLeft : "30px" ,
263
+ borderLeft : "1px solid lightgrey" ,
264
+ paddingLeft : "15px" ,
265
+ } }
266
+ >
267
+ { type == "problem" && < Problem onChange = { setBody } /> }
268
+ { type == "question" && (
269
+ < Question onChange = { setBody } defaultValue = { body } />
270
+ ) }
271
+ { type == "purchase" && (
272
+ < Purchase
273
+ onChange = { setBody }
274
+ defaultValue = { body }
275
+ showExtra = { showExtra }
276
+ />
277
+ ) }
278
+ { type == "task" && < Task onChange = { setBody } /> }
279
+ </ div >
280
+ </ >
281
+ ) }
262
282
</ VSpace >
263
283
264
284
< div style = { { textAlign : "center" , marginTop : "30px" } } >
@@ -281,16 +301,16 @@ export default function Create() {
281
301
{ submitting
282
302
? "Submitting..."
283
303
: success
284
- ? "Thank you for creating a ticket"
285
- : submitError
286
- ? "Close the error box to try again"
287
- : ! isValidEmailAddress ( email )
288
- ? "Enter Valid Email Address above"
289
- : ! subject
290
- ? "Enter Subject above"
291
- : ( body ?? "" ) . length < MIN_BODY_LENGTH
292
- ? `Describe your ${ type } in detail above`
293
- : "Create Support Ticket" }
304
+ ? "Thank you for creating a ticket"
305
+ : submitError
306
+ ? "Close the error box to try again"
307
+ : ! isValidEmailAddress ( email )
308
+ ? "Enter Valid Email Address above"
309
+ : ! subject
310
+ ? "Enter Subject above"
311
+ : ( body ?? "" ) . length < MIN_BODY_LENGTH
312
+ ? `Describe your ${ type } in detail above`
313
+ : "Create Support Ticket" }
294
314
</ Button >
295
315
{ submitting && < Loading style = { { fontSize : "32pt" } } /> }
296
316
{ submitError && (
0 commit comments