-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add ability to add education to resume
created CRUD commands and added education to md and txt export formats
- Loading branch information
Showing
16 changed files
with
387 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="add education" type="DotNetProject" factoryName=".NET Project" folderName="add"> | ||
<option name="EXE_PATH" value="$PROJECT_DIR$/Resumer/bin/Debug/net8.0/Resumer.exe" /> | ||
<option name="PROGRAM_PARAMETERS" value="add education" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Resumer/bin/Debug/net8.0" /> | ||
<option name="PASS_PARENT_ENVS" value="1" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Resumer/Resumer.csproj" /> | ||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> | ||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> | ||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> | ||
<option name="PROJECT_KIND" value="DotNetCore" /> | ||
<option name="PROJECT_TFM" value="net8.0" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="edit education" type="DotNetProject" factoryName=".NET Project" folderName="edit"> | ||
<option name="EXE_PATH" value="$PROJECT_DIR$/Resumer/bin/Debug/net8.0/Resumer.exe" /> | ||
<option name="PROGRAM_PARAMETERS" value="edit school" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Resumer/bin/Debug/net8.0" /> | ||
<option name="PASS_PARENT_ENVS" value="1" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Resumer/Resumer.csproj" /> | ||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> | ||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> | ||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> | ||
<option name="PROJECT_KIND" value="DotNetCore" /> | ||
<option name="PROJECT_TFM" value="net8.0" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="get educations" type="DotNetProject" factoryName=".NET Project" folderName="get"> | ||
<option name="EXE_PATH" value="$PROJECT_DIR$/Resumer/bin/Debug/net8.0/Resumer.exe" /> | ||
<option name="PROGRAM_PARAMETERS" value="get education" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Resumer/bin/Debug/net8.0" /> | ||
<option name="PASS_PARENT_ENVS" value="1" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Resumer/Resumer.csproj" /> | ||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> | ||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> | ||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> | ||
<option name="PROJECT_KIND" value="DotNetCore" /> | ||
<option name="PROJECT_TFM" value="net8.0" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System.Text.RegularExpressions; | ||
using Resumer.models; | ||
using Spectre.Console; | ||
using Spectre.Console.Cli; | ||
using static Resumer.Utility; | ||
|
||
namespace Resumer.cli.commands.add; | ||
|
||
public class AddEducationCommand: AddCommand | ||
{ | ||
protected override string ContinuePrompt => "Add another education?"; | ||
|
||
protected override int AddItem(CommandContext context, AddCommandSettings settings) | ||
{ | ||
var school = AnsiConsole.Ask<string>("School (name):"); | ||
var degree = | ||
AnsiConsole.Prompt(new SelectionPrompt<Certification>() | ||
.AddChoices(Enum.GetValues<Certification>()) | ||
.EnableSearch() | ||
.UseConverter(certification => certification.Print()) | ||
.WrapAround() | ||
); | ||
AnsiConsole.WriteLine($"Degree: {degree}"); | ||
var fieldOfStudy = AnsiConsole.Ask<string>("Field (or level) of study:"); | ||
var location = AnsiConsole.Prompt(SimplePrompt<string?>("Location:")); | ||
var gpa = AnsiConsole.Prompt(SimplePrompt<double?>("Grade point average:")); | ||
var startDate = AnsiConsole.Ask<DateOnly>("Start date:"); | ||
var endDate = AnsiConsole.Prompt(SimplePrompt<DateOnly?>("End date or expected graduation date (optional):")); | ||
|
||
AnsiConsole.WriteLine("\nHighlight certain courses, classes, subjects, projects, etc."); | ||
AnsiConsole.MarkupLine("Press [bold]Enter[/] to skip."); | ||
var courses = new List<string>(); | ||
courses.AddFromPrompt("Course:"); | ||
|
||
var additionalInformation = AnsiConsole.Prompt(SimplePrompt<string?>("Additional information:")); | ||
|
||
var education = new Education() | ||
{ | ||
School = school, | ||
Degree = degree, | ||
Courses = courses, | ||
|
||
Location = location, | ||
FieldOfStudy = fieldOfStudy, | ||
GradePointAverage = gpa, | ||
|
||
StartDate = startDate, | ||
EndDate = endDate, | ||
AdditionalInformation = additionalInformation, | ||
}; | ||
|
||
var db = new ResumeContext(); | ||
db.Education.Add(education); | ||
db.SaveChanges(); | ||
return CommandOutput.Success(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using Resumer.models; | ||
|
||
namespace Resumer.cli.commands.delete; | ||
|
||
public class DeleteEducationCommand: DeleteCommand<Education> | ||
{ | ||
protected override DbSet<Education> DbSet => Db.Education; | ||
} |
Oops, something went wrong.